Research Question
Goal of this analysis is to answer one of my four main research questions:
-Is variation in salinity, air temperature, or pH associated with changes in abundance or reproductive effort of Fucus distichus populations in SFE?
Note: I still don’t have the air temperature data completed so I’ll be focusing on salinity and pH. I do have water temeprature so I may look at that instead of air temp for now.
Data
Field data is the mean of these values per survey. Environmental data is the median of hourly median data inbetween field survey dates.
I will be using the combined environmental and field data at all sites. Right now I have the following match-ups for field site and water data source: China Camp and Paradise Cay, EOS and Point Chauncy, Richardson Bay and Brickyard Park, and Fort Point and Horseshoe Bay. I could match Paradise Cay with EOS instead of China Camp but that’s something I need to look into more.
Data for abundace: no.fuc.q (density: total number of fucus per quadrat), cover (percent conver fucus per quadrat), no.large.fuc.q (number of large fucus per quadrat), and no.small.fuc.q (number of small fucus per quadrat)
Data for reproductive effort: covcl.repro (cover class of reproductive tissue), dw.repro (dry weight of reproductive tissue), apices.repro (number of reproductive apices), perc.ra (percent of apices that are reproductive), avg.oog (average number of oogonia) and perc.rdw (percent of dry weight that is reproductive tissue)
Data for salinity: salinity (median salinity), daily.min.sal (daily minimun salinity), daily.max.sal (daily maximum salinity), daily.sal.range (daily salinity range), daily.med.sal (daily median salinity), min.daily.sal.lt5/10/15 (number of days with a minimun daily dalinity less than 5, 10, and 15), max.daily.sal.lt5/10/15 (number of days with a maximum daily salinity less than 5, 10, and 15) and daily.sal.range.gt5/10 (number of days with a daily salinity range greater than 5 and 10)
Data for pH: ph (median pH), daily.min.ph (daily minimum pH), daily.max.ph (daily maximum pH), daily.ph.range (daily pH range), daily.med.ph (daily median pH), min.daily.ph.lt7/8 (number of days with a daily minimum pH less than 7 and 8), max.daily.ph.lt7 (number of days with a daily maximum pH less than 7), and daily.ph.range.gt0.5 (number of days with a daily pH range greater than 0.5)
Breaking up main research question
Question for Karina:
-I’m not sure how to do every combination of all these variables? Should I see which ones have any significance and then try combos of those? Should I look at terms individually and then look at interactions with significate terms? –>because I’m not sure I didn’t look at a lot of interaction terms until I clarify this. For now the only interaction term I have is salinity:ph to keep it simple -Not sure if I should be looking at the lm or anova results for significance
Plot interpretation
Initial results summary:
Significate = P<0.05
Weak/slight = P<0.1
If no effect, not listed below. All variables tested are listed under “Data” section above
Not sure if I should be looking at the lm or anova results for these values. The difference between them is usually small but does make some values significant vs weakly significant
-Salinity terms with significant effect: salinity, daily minimum salinity, daily minimum salinity, daily salinity range, daily median salinity -Salinity terms with slight/weak effect: number of days with a daily minimun salinity less than 15, number of days with a daily salinity range greater than 5 -No pH terms had a significant effect on total density but different pH terms did change the level of significance of salinity on total density
-Salinity terms with significant effect: NONE -Salinity terms with slight/weak effect: daily salinity range -pH terms with significant effect: NONE -pH terms with slight/weak effect: daily pH range
-Salinity terms with significant effect: NONE -Salinity terms with slight/weak effect: NONE -pH terms with significant effect: NONE -pH terms with slight/weak effect: NONE
-Salinity terms with significant effect: salinity, daily minimum salinity, daily maximum salinity, daily salinity range, daily median salinity,
-Salinity terms with slight/weak effect: number of days with a daily minimun salinity less than 15, number of days with a daily salinity range greater than 5 -pH terms with significant effect: NONE -pH terms with slight/weak effect: NONE
-Salinity terms with significant effect: salinity, daily minimum salinity, daily salinity range, daily median salinity, number of days with a daily minimun salinity less than 15 -Salinity terms with slight/weak effect: NONE -pH terms with significant effect: NONE -pH terms with slight/weak effect: NONE
-Salinity terms with significant effect: NONE -Salinity terms with slight/weak effect: NONE -pH terms with significant effect: pH, daily minimum ph, -pH terms with slight/weak effect: daily median ph, number of days with a daily minimun ph less than 7, number of days with a daily maximum ph less than 7, number of days with a daily ph range greater than 0.5
-Salinity terms with significant effect: NONE -Salinity terms with slight/weak effect: NONE -pH terms with significant effect: NONE -pH terms with slight/weak effect: NONE
-Salinity terms with significant effect: salinity -Salinity terms with slight/weak effect: daily maximum salinity, daily salinity range -pH terms with significant effect: pH, daily maximum ph, daily median ph -pH terms with slight/weak effect: daily minimum ph, daily ph range, number of days with a daily minimun ph less than 8, -interactive term: salinity:ph (weak)
-Salinity terms with significant effect: NONE -Salinity terms with slight/weak effect: NONE -pH terms with significant effect: ph, -pH terms with slight/weak effect: number of days with a daily minimun ph less than 7, number of days with a daily maximum ph less than 7
-Salinity terms with significant effect: -Salinity terms with slight/weak effect: salinity, daily maximum salinity, daily salinity range, number of dasy with a daily minimum salinity less than 5, number of days with a daily maximum salinity less than 15 -pH terms with significant effect: ph, daily maximum ph, daily median ph -pH terms with slight/weak effect: daily minimum ph, daily ph range, number of days with a daily minimun ph less than 8, -interactive term: salinity:ph (weak)
Initial interpretation of results
(these are just initial impressions and not well articulated/thought out yet) -Salintiy has more of an impact on Fucus abundance while pH has more of an impact on fucus reproduction –>does this align with the results I see in my experiment? -Salinity impacts density but not cover, suggesting that cover is maintained even as density composition (size of thalli) changes. The composition changes but the cover remains. This is seen in my field work as well, density declined but cover remained pretty constant. -Density of small thalli are effected by changes to salinity but large thalli are not suggesting small thalli are driving the driving factor to why density is effected but not cover since larger thalli contribute more to cover than small thalli. Again,this pattern is also seen in my field work; total density pattern follows the small thalli density pattern more than large thalli. -Since small thalli are affected by salinity and large are not: This suggests that there’s some critical size that once fucus reaches it’s more tolerant to salinity changes –> suggestion for future studies -Cover class of reproductive tissue (percent cover that is reproductive tissue) is affected by salinity and I wonder if this trend is also mainly driven by the amount of small thalli? Since small thalli tend to have less reproductive tissue than large thalli -Need to look at the direction of the relationship of ph and repro (linear equation)
Set up
rm(list=ls())
library(tidyverse)
library(ggpubr)
library(scales)
library(chron)
library(plotly)
library(taRifx)
library(aweek)
library(easypackages)
library(renv)
library(here)
library(ggthemes)
library(gridExtra)
library(patchwork)
library(tidyquant)
library(recipes)
library(cranlogs)
library(knitr)
library(openair)
Read in data
#read in data
all<-read.csv("C:/Users/chels/Box Sync/Thesis/Data/Working data/Bouy data/envi.field.all.csv", header = TRUE, sep=",", fileEncoding="UTF-8-BOM", stringsAsFactors = FALSE)
####Q1. Effects of salinity and pH on abundance####
Redundant from above, just placing it here for reference
Data for abundace: no.fuc.q (density: total number of fucus per quadrat), cover (percent conver fucus per quadrat), no.large.fuc.q (number of large fucus per quadrat), and no.small.fuc.q (number of small fucus per quadrat)
Data for salinity: salinity (median salinity), daily.min.sal (daily minimun salinity), daily.max.sal (daily maximum salinity), daily.sal.range (daily salinity range), daily.med.sal (daily median salinity), min.daily.sal.lt5/10/15 (number of days with a minimun daily dalinity less than 5, 10, and 15), max.daily.sal.lt5/10/15 (number of days with a maximum daily salinity less than 5, 10, and 15) and daily.sal.range.gt5/10 (number of days with a daily salinity range greater than 5 and 10)
Data for pH: ph (median pH), daily.min.ph (daily minimum pH), daily.max.ph (daily maximum pH), daily.ph.range (daily pH range), daily.med.ph (daily median pH), min.daily.ph.lt7/8 (number of days with a daily minimum pH less than 7 and 8), max.daily.ph.lt7 (number of days with a daily maximum pH less than 7), and daily.ph.range.gt0.5 (number of days with a daily pH range greater than 0.5)
####Q1.1 Effect of salinity and pH on total density#### Different salinity terms first
Effect of pH and salinity on density
lm1 <- lm(no.fuc.q ~ salinity + ph + salinity:ph, data =all)
lm1
##
## Call:
## lm(formula = no.fuc.q ~ salinity + ph + salinity:ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph salinity:ph
## 168.283 -12.429 -22.897 1.877
summary (lm1)
##
## Call:
## lm(formula = no.fuc.q ~ salinity + ph + salinity:ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -38.63 -25.34 -10.50 10.54 114.39
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 168.283 1445.158 0.116 0.908
## salinity -12.429 64.140 -0.194 0.847
## ph -22.897 182.826 -0.125 0.901
## salinity:ph 1.877 8.119 0.231 0.818
##
## Residual standard error: 34.95 on 41 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.2075, Adjusted R-squared: 0.1495
## F-statistic: 3.578 on 3 and 41 DF, p-value: 0.02182
anova (lm1)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 12797 12797.3 10.4788 0.002393 **
## ph 1 246 246.0 0.2015 0.655910
## salinity:ph 1 65 65.3 0.0535 0.818312
## Residuals 41 50072 1221.3
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm1)
Effect of pH and salinity on density, interaction term removed
lm2 <- lm(no.fuc.q ~ salinity + ph, data =all)
lm2
##
## Call:
## lm(formula = no.fuc.q ~ salinity + ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph
## -157.345 2.399 18.307
summary (lm2)
##
## Call:
## lm(formula = no.fuc.q ~ salinity + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -38.608 -25.180 -9.907 13.696 114.562
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -157.3453 319.9981 -0.492 0.62549
## salinity 2.3992 0.7271 3.299 0.00198 **
## ph 18.3068 40.3247 0.454 0.65218
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 34.55 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.2064, Adjusted R-squared: 0.1687
## F-statistic: 5.463 on 2 and 42 DF, p-value: 0.007782
anova (lm2)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 12797 12797.3 10.7204 0.002126 **
## ph 1 246 246.0 0.2061 0.652177
## Residuals 42 50137 1193.7
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm2)
Effect and salinity and pH on density: daily minimum salinity
lm3 <- lm(no.fuc.q ~ daily.min.sal + ph, data =all)
lm3
##
## Call:
## lm(formula = no.fuc.q ~ daily.min.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.min.sal ph
## -100.25 2.24 12.18
summary (lm3)
##
## Call:
## lm(formula = no.fuc.q ~ daily.min.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -40.950 -23.138 -7.576 11.559 112.190
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -100.25 315.20 -0.318 0.7520
## daily.min.sal 2.24 0.65 3.446 0.0013 **
## ph 12.18 39.85 0.306 0.7614
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 34.23 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.221, Adjusted R-squared: 0.1839
## F-statistic: 5.959 on 2 and 42 DF, p-value: 0.00527
anova (lm3)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.sal 1 13856 13855.8 11.8245 0.001332 **
## ph 1 109 109.5 0.0934 0.761368
## Residuals 42 49215 1171.8
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect and salinity and pH on density: daily maximum salinity
lm4 <- lm(no.fuc.q ~ daily.max.sal + ph, data =all)
lm4
##
## Call:
## lm(formula = no.fuc.q ~ daily.max.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.max.sal ph
## -193.164 2.629 21.211
summary (lm4)
##
## Call:
## lm(formula = no.fuc.q ~ daily.max.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -37.28 -24.82 -10.18 11.83 115.60
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -193.1639 331.5842 -0.583 0.56331
## daily.max.sal 2.6294 0.9233 2.848 0.00678 **
## ph 21.2111 41.5612 0.510 0.61247
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 35.49 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.1625, Adjusted R-squared: 0.1226
## F-statistic: 4.074 on 2 and 42 DF, p-value: 0.02414
anova (lm4)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.sal 1 9938 9937.8 7.8880 0.00752 **
## ph 1 328 328.2 0.2605 0.61247
## Residuals 42 52914 1259.9
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm4)
Effect and salinity and pH on density: daily salinity range
lm5 <- lm(no.fuc.q ~ daily.sal.range + ph, data =all)
lm5
##
## Call:
## lm(formula = no.fuc.q ~ daily.sal.range + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range ph
## 79.581 -2.551 -2.934
summary (lm5)
##
## Call:
## lm(formula = no.fuc.q ~ daily.sal.range + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -41.438 -22.839 -10.380 9.927 115.644
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 79.581 343.176 0.232 0.8177
## daily.sal.range -2.551 1.255 -2.032 0.0485 *
## ph -2.934 43.385 -0.068 0.9464
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 36.99 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.09022, Adjusted R-squared: 0.0469
## F-statistic: 2.083 on 2 and 42 DF, p-value: 0.1373
anova (lm5)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range 1 5694 5694.1 4.1606 0.0477 *
## ph 1 6 6.3 0.0046 0.9464
## Residuals 42 57480 1368.6
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect and salinity and pH on density: daily median salinity
lm6 <- lm(no.fuc.q ~ daily.med.sal + ph, data =all)
lm6
##
## Call:
## lm(formula = no.fuc.q ~ daily.med.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.med.sal ph
## -156.853 2.388 18.322
summary (lm6)
##
## Call:
## lm(formula = no.fuc.q ~ daily.med.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.05 -24.11 -10.00 13.09 114.66
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -156.8530 320.3040 -0.490 0.62689
## daily.med.sal 2.3878 0.7271 3.284 0.00207 **
## ph 18.3219 40.3644 0.454 0.65223
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 34.58 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.2049, Adjusted R-squared: 0.1671
## F-statistic: 5.413 on 2 and 42 DF, p-value: 0.0081
anova (lm6)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.sal 1 12701 12701.2 10.620 0.002221 **
## ph 1 246 246.4 0.206 0.652229
## Residuals 42 50233 1196.0
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect of salinity and pH on density: number of days with a daily minimun salinity less than 5
lm7 <- lm(no.fuc.q ~ min.daily.sal.lt5 + ph, data =all)
lm7
##
## Call:
## lm(formula = no.fuc.q ~ min.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt5 ph
## -22.7630 -0.0223 8.4803
summary (lm7)
##
## Call:
## lm(formula = no.fuc.q ~ min.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -36.413 -24.922 -14.090 5.789 119.291
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -22.7630 373.1041 -0.061 0.952
## min.daily.sal.lt5 -0.0223 0.7565 -0.029 0.977
## ph 8.4803 47.5925 0.178 0.859
##
## Residual standard error: 38.77 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.0007751, Adjusted R-squared: -0.04681
## F-statistic: 0.01629 on 2 and 42 DF, p-value: 0.9838
anova (lm7)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt5 1 1 1.24 0.0008 0.9772
## ph 1 48 47.72 0.0317 0.8594
## Residuals 42 63131 1503.13
plot (lm7)
Effect of salinity and pH on density: number of days with a daily minimun salinity less than 10
lm8 <- lm(no.fuc.q ~ min.daily.sal.lt10 + ph, data =all)
lm8
##
## Call:
## lm(formula = no.fuc.q ~ min.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt10 ph
## -168.5631 -0.8751 28.3393
summary (lm8)
##
## Call:
## lm(formula = no.fuc.q ~ min.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.98 -23.97 -13.37 10.63 109.06
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -168.5631 369.8671 -0.456 0.651
## min.daily.sal.lt10 -0.8751 0.7072 -1.237 0.223
## ph 28.3393 47.2553 0.600 0.552
##
## Residual standard error: 38.08 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.0359, Adjusted R-squared: -0.01001
## F-statistic: 0.782 on 2 and 42 DF, p-value: 0.464
anova (lm8)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt10 1 1747 1746.66 1.2044 0.2787
## ph 1 522 521.59 0.3596 0.5519
## Residuals 42 60912 1450.29
plot (lm8)
Effect of salinity and pH on density: number of days with a daily minimun salinity less than 15
lm9 <- lm(no.fuc.q ~ min.daily.sal.lt15 +ph , data =all)
lm9
##
## Call:
## lm(formula = no.fuc.q ~ min.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt15 ph
## -118.735 -1.195 22.767
summary (lm9)
##
## Call:
## lm(formula = no.fuc.q ~ min.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -44.91 -23.68 -12.25 12.08 103.57
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -118.7350 345.9250 -0.343 0.7331
## min.daily.sal.lt15 -1.1946 0.6347 -1.882 0.0667 .
## ph 22.7675 44.0262 0.517 0.6078
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 37.23 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.07849, Adjusted R-squared: 0.0346
## F-statistic: 1.789 on 2 and 42 DF, p-value: 0.1797
anova (lm9)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt15 1 4588 4588.0 3.3097 0.0760 .
## ph 1 371 370.7 0.2674 0.6078
## Residuals 42 58222 1386.2
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm9)
Effect of salinity and pH on density: number of days with a daily maximum salinity less than 5
lm10 <- lm(no.fuc.q ~ max.daily.sal.lt5 +ph, data =all)
lm10
##
## Call:
## lm(formula = no.fuc.q ~ max.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt5 ph
## -29.7192 -0.0563 9.4085
summary (lm10)
##
## Call:
## lm(formula = no.fuc.q ~ max.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -36.570 -25.013 -14.270 6.033 118.948
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -29.7192 380.1293 -0.078 0.938
## max.daily.sal.lt5 -0.0563 0.7325 -0.077 0.939
## ph 9.4085 48.5293 0.194 0.847
##
## Residual standard error: 38.77 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.0008949, Adjusted R-squared: -0.04668
## F-statistic: 0.01881 on 2 and 42 DF, p-value: 0.9814
anova (lm10)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt5 1 0 0.05 0.0000 0.9954
## ph 1 56 56.49 0.0376 0.8472
## Residuals 42 63124 1502.95
plot (lm10)
Effect of salinity and pH on density: number of days with a daily maximum salinity less than 10
lm11 <- lm(no.fuc.q ~ max.daily.sal.lt10 +ph, data =all)
lm11
##
## Call:
## lm(formula = no.fuc.q ~ max.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt10 ph
## -58.2233 -0.2112 13.2417
summary (lm11)
##
## Call:
## lm(formula = no.fuc.q ~ max.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -37.43 -25.32 -15.13 6.47 117.33
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -58.2233 380.9538 -0.153 0.879
## max.daily.sal.lt10 -0.2112 0.7437 -0.284 0.778
## ph 13.2417 48.6612 0.272 0.787
##
## Residual standard error: 38.73 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.002669, Adjusted R-squared: -0.04482
## F-statistic: 0.05619 on 2 and 42 DF, p-value: 0.9454
anova (lm11)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt10 1 58 57.52 0.0383 0.8457
## ph 1 111 111.09 0.0740 0.7869
## Residuals 42 63012 1500.28
plot (lm11)
Effect of salinity and pH on density: number of days with a daily maximum salinity less than 15
lm12 <- lm(no.fuc.q ~ max.daily.sal.lt15 +ph, data =all)
lm12
##
## Call:
## lm(formula = no.fuc.q ~ max.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt15 ph
## -164.7073 -0.7008 27.5323
summary (lm12)
##
## Call:
## lm(formula = no.fuc.q ~ max.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -40.490 -26.062 -14.279 9.566 111.403
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -164.7073 381.7517 -0.431 0.668
## max.daily.sal.lt15 -0.7008 0.7131 -0.983 0.331
## ph 27.5323 48.8189 0.564 0.576
##
## Residual standard error: 38.33 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.02322, Adjusted R-squared: -0.0233
## F-statistic: 0.4991 on 2 and 42 DF, p-value: 0.6106
anova (lm12)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt15 1 999 999.39 0.6801 0.4142
## ph 1 467 467.35 0.3181 0.5758
## Residuals 42 61714 1469.37
plot (lm12)
Effect of salinity and pH on density: number of days with a daily salinity range greater than 10
lm13 <- lm(no.fuc.q ~ daily.sal.range.gt10 +ph, data =all)
lm13
##
## Call:
## lm(formula = no.fuc.q ~ daily.sal.range.gt10 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt10 ph
## -36.3536 -0.1021 10.3131
summary (lm13)
##
## Call:
## lm(formula = no.fuc.q ~ daily.sal.range.gt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -36.549 -25.108 -14.147 6.209 118.482
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -36.3536 376.1979 -0.097 0.923
## daily.sal.range.gt10 -0.1021 0.7365 -0.139 0.890
## ph 10.3131 48.0107 0.215 0.831
##
## Residual standard error: 38.76 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.001211, Adjusted R-squared: -0.04635
## F-statistic: 0.02546 on 2 and 42 DF, p-value: 0.9749
anova (lm13)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt10 1 7 7.19 0.0048 0.9452
## ph 1 69 69.33 0.0461 0.8310
## Residuals 42 63104 1502.47
plot (lm13)
Effect of salinity and pH on density: number of days with a daily salinity range greater than 5
lm14 <- lm(no.fuc.q ~ daily.sal.range.gt5 +ph, data =all)
lm14
##
## Call:
## lm(formula = no.fuc.q ~ daily.sal.range.gt5 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt5 ph
## -4.998 -1.291 8.654
summary (lm14)
##
## Call:
## lm(formula = no.fuc.q ~ daily.sal.range.gt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.23 -25.70 -13.00 13.28 101.42
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -4.9982 340.2736 -0.015 0.9884
## daily.sal.range.gt5 -1.2914 0.6461 -1.999 0.0521 .
## ph 8.6543 43.1123 0.201 0.8419
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 37.05 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.08755, Adjusted R-squared: 0.0441
## F-statistic: 2.015 on 2 and 42 DF, p-value: 0.146
anova (lm14)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt5 1 5476 5475.9 3.9894 0.05229 .
## ph 1 55 55.3 0.0403 0.84187
## Residuals 42 57649 1372.6
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm14)
Different pH terms
Data for pH: ph (median pH), daily.min.ph (daily minimum pH), daily.max.ph (daily maximum pH), daily.ph.range (daily pH range), daily.med.ph (daily median pH), min.daily.ph.lt7/8 (number of days with a daily minimum pH less than 7 and 8), max.daily.ph.lt7 (number of days with a daily maximum pH less than 7), and daily.ph.range.gt0.5 (number of days with a daily pH range greater than 0.5)
Effect salinity and pH on density: daily minimum ph
lm3 <- lm(no.fuc.q ~ daily.min.ph + salinity, data =all)
lm3
##
## Call:
## lm(formula = no.fuc.q ~ daily.min.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.min.ph salinity
## 30.926 -5.500 2.361
summary (lm3)
##
## Call:
## lm(formula = no.fuc.q ~ daily.min.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.685 -24.501 -9.043 9.661 114.516
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 30.9262 432.5131 0.072 0.94334
## daily.min.ph -5.5004 54.9902 -0.100 0.92080
## salinity 2.3613 0.7372 3.203 0.00259 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 34.63 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.2027, Adjusted R-squared: 0.1648
## F-statistic: 5.34 on 2 and 42 DF, p-value: 0.008582
anova (lm3)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.ph 1 504 504.2 0.4204 0.520282
## salinity 1 12305 12305.2 10.2602 0.002594 **
## Residuals 42 50371 1199.3
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect salinity and pH on density: daily maximum ph
lm4 <- lm(no.fuc.q ~ daily.max.ph + salinity, data =all)
lm4
##
## Call:
## lm(formula = no.fuc.q ~ daily.max.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.max.ph salinity
## -222.049 26.099 2.435
summary (lm4)
##
## Call:
## lm(formula = no.fuc.q ~ daily.max.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.398 -25.512 -9.885 15.010 107.665
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -222.049 233.031 -0.953 0.34611
## daily.max.ph 26.099 28.911 0.903 0.37182
## salinity 2.435 0.723 3.368 0.00163 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 34.3 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.2177, Adjusted R-squared: 0.1805
## F-statistic: 5.845 on 2 and 42 DF, p-value: 0.005761
anova (lm4)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.ph 1 411 410.7 0.349 0.557832
## salinity 1 13346 13345.6 11.341 0.001632 **
## Residuals 42 49424 1176.8
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm4)
Effect of salinity and pH on density: daily ph range
lm5 <- lm(no.fuc.q ~ daily.ph.range + salinity, data =all)
lm5
##
## Call:
## lm(formula = no.fuc.q ~ daily.ph.range + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range salinity
## -12.358 -4.387 2.470
summary (lm5)
##
## Call:
## lm(formula = no.fuc.q ~ daily.ph.range + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -42.387 -21.662 -7.825 9.638 114.344
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -12.3577 17.6005 -0.702 0.48647
## daily.ph.range -4.3872 3.2948 -1.332 0.19019
## salinity 2.4703 0.7156 3.452 0.00128 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.93 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.2349, Adjusted R-squared: 0.1984
## F-statistic: 6.446 on 2 and 42 DF, p-value: 0.003619
anova (lm5)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range 1 1120 1120.3 0.9733 0.329497
## salinity 1 13718 13717.8 11.9181 0.001281 **
## Residuals 42 48342 1151.0
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect salinity and pH on density: daily median ph
lm6 <- lm(no.fuc.q ~ daily.med.ph + salinity, data =all)
lm6
##
## Call:
## lm(formula = no.fuc.q ~ daily.med.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.med.ph salinity
## -111.620 12.505 2.398
summary (lm6)
##
## Call:
## lm(formula = no.fuc.q ~ daily.med.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -38.926 -25.042 -9.958 13.099 114.078
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -111.6205 310.1213 -0.360 0.72071
## daily.med.ph 12.5048 38.9795 0.321 0.74995
## salinity 2.3980 0.7298 3.286 0.00206 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 34.59 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.2045, Adjusted R-squared: 0.1666
## F-statistic: 5.399 on 2 and 42 DF, p-value: 0.008193
anova (lm6)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.ph 1 0 0.5 0.0004 0.983854
## salinity 1 12920 12920.0 10.7967 0.002058 **
## Residuals 42 50260 1196.7
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect salinity and pH on density: number of days with a daily minimun ph less than 7
lm7 <- lm(no.fuc.q ~ min.daily.ph.lt7 + salinity, data =all)
lm7
##
## Call:
## lm(formula = no.fuc.q ~ min.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt7 salinity
## -9.0117 -0.9642 2.6204
summary (lm7)
##
## Call:
## lm(formula = no.fuc.q ~ min.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -36.89 -24.83 -10.85 17.58 106.13
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -9.0117 17.6826 -0.510 0.612974
## min.daily.ph.lt7 -0.9642 0.6662 -1.447 0.155226
## salinity 2.6204 0.7295 3.592 0.000853 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.8 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.2404, Adjusted R-squared: 0.2043
## F-statistic: 6.647 on 2 and 42 DF, p-value: 0.003103
anova (lm7)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt7 1 447 447.1 0.3913 0.5350185
## salinity 1 14744 14743.8 12.9036 0.0008531 ***
## Residuals 42 47990 1142.6
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect salinity and pH on density: number of days with a daily minimun ph less than 8
lm7 <- lm(no.fuc.q ~ min.daily.ph.lt8 + salinity, data =all)
lm7
##
## Call:
## lm(formula = no.fuc.q ~ min.daily.ph.lt8 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt8 salinity
## -10.41267 -0.07862 2.37825
summary (lm7)
##
## Call:
## lm(formula = no.fuc.q ~ min.daily.ph.lt8 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -40.655 -25.355 -9.561 10.160 114.521
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -10.41267 19.71015 -0.528 0.60008
## min.daily.ph.lt8 -0.07862 0.33874 -0.232 0.81760
## salinity 2.37825 0.72655 3.273 0.00213 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 34.61 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.2036, Adjusted R-squared: 0.1656
## F-statistic: 5.368 on 2 and 42 DF, p-value: 0.008396
anova (lm7)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt8 1 25 24.9 0.0208 0.885982
## salinity 1 12837 12836.9 10.7148 0.002131 **
## Residuals 42 50319 1198.1
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect salinity and pH on density: number of days with a daily maximum ph less than 7
lm10 <- lm(no.fuc.q ~ max.daily.ph.lt7 + salinity, data =all)
lm10
##
## Call:
## lm(formula = no.fuc.q ~ max.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) max.daily.ph.lt7 salinity
## -9.0117 -0.9642 2.6204
summary (lm10)
##
## Call:
## lm(formula = no.fuc.q ~ max.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -36.89 -24.83 -10.85 17.58 106.13
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -9.0117 17.6826 -0.510 0.612974
## max.daily.ph.lt7 -0.9642 0.6662 -1.447 0.155226
## salinity 2.6204 0.7295 3.592 0.000853 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.8 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.2404, Adjusted R-squared: 0.2043
## F-statistic: 6.647 on 2 and 42 DF, p-value: 0.003103
anova (lm10)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.ph.lt7 1 447 447.1 0.3913 0.5350185
## salinity 1 14744 14743.8 12.9036 0.0008531 ***
## Residuals 42 47990 1142.6
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm10)
Effect salinity and pH on density: number of days with a daily ph range greater than 0.5
lm13 <- lm(no.fuc.q ~ daily.ph.range.gt0.5 +salinity, data =all)
lm13
##
## Call:
## lm(formula = no.fuc.q ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range.gt0.5 salinity
## -9.996 -0.572 2.527
summary (lm13)
##
## Call:
## lm(formula = no.fuc.q ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -38.61 -24.18 -8.49 13.55 114.27
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -9.9962 17.9847 -0.556 0.58129
## daily.ph.range.gt0.5 -0.5720 0.6396 -0.894 0.37628
## salinity 2.5272 0.7401 3.415 0.00143 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 34.31 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.2175, Adjusted R-squared: 0.1802
## F-statistic: 5.835 on 2 and 42 DF, p-value: 0.005804
anova (lm13)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range.gt0.5 1 13 13.1 0.0111 0.916469
## salinity 1 13726 13725.6 11.6597 0.001427 **
## Residuals 42 49442 1177.2
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm13)
####Q1.2 Effect of salinity and pH on percent cover#### Different salinity terms first
Effect of pH and salinity on percent cover
lm1 <- lm(cover ~ salinity + ph + salinity:ph, data =all)
lm1
##
## Call:
## lm(formula = cover ~ salinity + ph + salinity:ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph salinity:ph
## -228.6859 6.1732 32.7590 -0.7582
summary (lm1)
##
## Call:
## lm(formula = cover ~ salinity + ph + salinity:ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -28.478 -10.696 2.522 8.911 25.604
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -228.6859 622.7157 -0.367 0.715
## salinity 6.1732 27.6378 0.223 0.824
## ph 32.7590 78.7793 0.416 0.680
## salinity:ph -0.7582 3.4987 -0.217 0.829
##
## Residual standard error: 15.06 on 41 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.02726, Adjusted R-squared: -0.04392
## F-statistic: 0.3829 on 3 and 41 DF, p-value: 0.7658
anova (lm1)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 59.2 59.168 0.2609 0.6122
## ph 1 190.7 190.671 0.8409 0.3645
## salinity:ph 1 10.7 10.650 0.0470 0.8295
## Residuals 41 9297.0 226.756
plot (lm1)
Effect of pH and salinity on percent cover, interaction term removed
lm2 <- lm(cover ~ salinity + ph, data =all)
lm2
##
## Call:
## lm(formula = cover ~ salinity + ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph
## -97.1578 0.1838 16.1161
summary (lm2)
##
## Call:
## lm(formula = cover ~ salinity + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -29.140 -10.763 2.683 9.241 25.532
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -97.1578 137.8757 -0.705 0.485
## salinity 0.1838 0.3133 0.587 0.560
## ph 16.1161 17.3744 0.928 0.359
##
## Residual standard error: 14.89 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.02614, Adjusted R-squared: -0.02023
## F-statistic: 0.5637 on 2 and 42 DF, p-value: 0.5734
anova (lm2)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 59.2 59.168 0.2670 0.6081
## ph 1 190.7 190.671 0.8604 0.3589
## Residuals 42 9307.6 221.610
plot (lm2)
Effect and salinity and pH on percent cover: daily minimum salinity
lm3 <- lm(cover ~ daily.min.sal + ph, data =all)
lm3
##
## Call:
## lm(formula = cover ~ daily.min.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.min.sal ph
## -97.6669 0.3071 15.8975
summary (lm3)
##
## Call:
## lm(formula = cover ~ daily.min.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -30.226 -10.112 2.533 9.797 23.934
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -97.6669 135.7036 -0.720 0.476
## daily.min.sal 0.3071 0.2798 1.097 0.279
## ph 15.8975 17.1571 0.927 0.359
##
## Residual standard error: 14.74 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.04552, Adjusted R-squared: 7.31e-05
## F-statistic: 1.002 on 2 and 42 DF, p-value: 0.3759
anova (lm3)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.sal 1 248.6 248.62 1.1447 0.2908
## ph 1 186.5 186.48 0.8585 0.3594
## Residuals 42 9122.4 217.20
plot (lm3)
Effect and salinity and pH on percent cover: daily maximum salinity
lm4 <- lm(cover ~ daily.max.sal + ph, data =all)
lm4
##
## Call:
## lm(formula = cover ~ daily.max.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.max.sal ph
## -86.329231 -0.003993 15.308840
summary (lm4)
##
## Call:
## lm(formula = cover ~ daily.max.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -28.338 -10.610 3.594 8.030 27.016
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -86.329231 139.636447 -0.618 0.540
## daily.max.sal -0.003993 0.388812 -0.010 0.992
## ph 15.308840 17.502226 0.875 0.387
##
## Residual standard error: 14.95 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.01816, Adjusted R-squared: -0.02859
## F-statistic: 0.3884 on 2 and 42 DF, p-value: 0.6806
anova (lm4)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.sal 1 2.6 2.622 0.0117 0.9143
## ph 1 170.9 170.936 0.7651 0.3867
## Residuals 42 9383.9 223.427
plot (lm4)
Effect and salinity and pH on percent cover: daily salinity range
lm5 <- lm(cover ~ daily.sal.range + ph, data =all)
lm5
##
## Call:
## lm(formula = cover ~ daily.sal.range + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range ph
## -49.3543 -0.9592 11.2057
summary (lm5)
##
## Call:
## lm(formula = cover ~ daily.sal.range + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -31.663 -7.605 2.940 8.617 22.569
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -49.3543 132.6258 -0.372 0.7117
## daily.sal.range -0.9592 0.4852 -1.977 0.0546 .
## ph 11.2057 16.7667 0.668 0.5076
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 14.3 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.1018, Adjusted R-squared: 0.05898
## F-statistic: 2.379 on 2 and 42 DF, p-value: 0.105
anova (lm5)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range 1 881.2 881.18 4.3110 0.04402 *
## ph 1 91.3 91.30 0.4467 0.50758
## Residuals 42 8585.0 204.40
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect and salinity and pH on percent cover: daily median salinity
lm6 <- lm(cover ~ daily.med.sal + ph, data =all)
lm6
##
## Call:
## lm(formula = cover ~ daily.med.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.med.sal ph
## -98.4481 0.2061 16.2167
summary (lm6)
##
## Call:
## lm(formula = cover ~ daily.med.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -29.171 -10.832 2.538 9.441 25.325
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -98.4481 137.7296 -0.715 0.479
## daily.med.sal 0.2061 0.3126 0.659 0.513
## ph 16.2167 17.3565 0.934 0.355
##
## Residual standard error: 14.87 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.02821, Adjusted R-squared: -0.01807
## F-statistic: 0.6096 on 2 and 42 DF, p-value: 0.5483
anova (lm6)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.sal 1 76.5 76.546 0.3461 0.5595
## ph 1 193.0 193.048 0.8730 0.3555
## Residuals 42 9287.9 221.140
plot (lm6)
Effect of salinity and pH on percent cover: number of days with a daily minimun salinity less than 5
lm7 <- lm(cover ~ min.daily.sal.lt5 + ph, data =all)
lm7
##
## Call:
## lm(formula = cover ~ min.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt5 ph
## -111.8515 -0.1711 18.7576
summary (lm7)
##
## Call:
## lm(formula = cover ~ min.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -30.338 -9.354 2.462 10.726 26.878
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -111.8515 143.2559 -0.781 0.439
## min.daily.sal.lt5 -0.1711 0.2904 -0.589 0.559
## ph 18.7576 18.2735 1.026 0.311
##
## Residual standard error: 14.89 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.02621, Adjusted R-squared: -0.02017
## F-statistic: 0.5651 on 2 and 42 DF, p-value: 0.5726
anova (lm7)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt5 1 17.0 16.962 0.0765 0.7834
## ph 1 233.5 233.493 1.0537 0.3105
## Residuals 42 9307.0 221.596
plot (lm7)
Effect of salinity and pH on percent cover: number of days with a daily minimun salinity less than 10
lm8 <- lm(cover ~ min.daily.sal.lt10 + ph, data =all)
lm8
##
## Call:
## lm(formula = cover ~ min.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt10 ph
## -115.9994 -0.1726 19.3339
summary (lm8)
##
## Call:
## lm(formula = cover ~ min.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -30.799 -9.732 3.215 10.221 26.488
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -115.9994 144.5034 -0.803 0.427
## min.daily.sal.lt10 -0.1726 0.2763 -0.625 0.536
## ph 19.3339 18.4622 1.047 0.301
##
## Residual standard error: 14.88 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.0272, Adjusted R-squared: -0.01913
## F-statistic: 0.5871 on 2 and 42 DF, p-value: 0.5604
anova (lm8)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt10 1 17.2 17.151 0.0775 0.7821
## ph 1 242.8 242.769 1.0967 0.3010
## Residuals 42 9297.6 221.370
plot (lm8)
Effect of salinity and pH on percent cover: number of days with a daily minimun salinity less than 15
lm9 <- lm(cover ~ min.daily.sal.lt15 +ph , data =all)
lm9
##
## Call:
## lm(formula = cover ~ min.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt15 ph
## -99.6860 -0.1576 17.2723
summary (lm9)
##
## Call:
## lm(formula = cover ~ min.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -30.635 -10.029 2.974 10.577 26.311
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -99.6860 138.2439 -0.721 0.475
## min.daily.sal.lt15 -0.1576 0.2536 -0.621 0.538
## ph 17.2723 17.5944 0.982 0.332
##
## Residual standard error: 14.88 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.0271, Adjusted R-squared: -0.01923
## F-statistic: 0.5849 on 2 and 42 DF, p-value: 0.5616
anova (lm9)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt15 1 45.6 45.617 0.2060 0.6522
## ph 1 213.4 213.360 0.9637 0.3319
## Residuals 42 9298.5 221.393
plot (lm9)
Effect of salinity and pH on percent cover: number of days with a daily maximum salinity less than 5
lm10 <- lm(cover ~ max.daily.sal.lt5 +ph, data =all)
lm10
##
## Call:
## lm(formula = cover ~ max.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt5 ph
## -139.1476 -0.2888 22.3808
summary (lm10)
##
## Call:
## lm(formula = cover ~ max.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -31.910 -8.564 1.784 9.850 26.726
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -139.1476 144.7286 -0.961 0.342
## max.daily.sal.lt5 -0.2888 0.2789 -1.035 0.306
## ph 22.3808 18.4768 1.211 0.233
##
## Residual standard error: 14.76 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.04259, Adjusted R-squared: -0.002997
## F-statistic: 0.9343 on 2 and 42 DF, p-value: 0.4009
anova (lm10)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt5 1 87.4 87.42 0.4013 0.5299
## ph 1 319.7 319.66 1.4672 0.2326
## Residuals 42 9150.4 217.87
plot (lm10)
Effect of salinity and pH on percent cover: number of days with a daily maximum salinity less than 10
lm11 <- lm(cover ~ max.daily.sal.lt10 +ph, data =all)
lm11
##
## Call:
## lm(formula = cover ~ max.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt10 ph
## -137.2208 -0.2759 22.1332
summary (lm11)
##
## Call:
## lm(formula = cover ~ max.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -31.869 -8.766 1.681 9.801 26.627
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -137.2208 145.3862 -0.944 0.351
## max.daily.sal.lt10 -0.2759 0.2838 -0.972 0.337
## ph 22.1332 18.5709 1.192 0.240
##
## Residual standard error: 14.78 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.03976, Adjusted R-squared: -0.005968
## F-statistic: 0.8695 on 2 and 42 DF, p-value: 0.4266
anova (lm11)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt10 1 69.6 69.605 0.3185 0.5755
## ph 1 310.4 310.381 1.4204 0.2400
## Residuals 42 9177.5 218.512
plot (lm11)
Effect of salinity and pH on percent cover: number of days with a daily maximum salinity less than 15
lm12 <- lm(cover ~ max.daily.sal.lt15 +ph, data =all)
lm12
##
## Call:
## lm(formula = cover ~ max.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt15 ph
## -122.4243 -0.1729 20.1394
summary (lm12)
##
## Call:
## lm(formula = cover ~ max.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -30.818 -9.665 3.279 10.297 26.552
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -122.4243 148.1750 -0.826 0.413
## max.daily.sal.lt15 -0.1729 0.2768 -0.625 0.536
## ph 20.1394 18.9488 1.063 0.294
##
## Residual standard error: 14.88 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.02719, Adjusted R-squared: -0.01913
## F-statistic: 0.587 on 2 and 42 DF, p-value: 0.5605
anova (lm12)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt15 1 9.8 9.845 0.0445 0.8340
## ph 1 250.1 250.064 1.1296 0.2939
## Residuals 42 9297.6 221.371
plot (lm12)
Effect of salinity and pH on percent cover: number of days with a daily salinity range greater than 10
lm13 <- lm(cover ~ daily.sal.range.gt10 +ph, data =all)
lm13
##
## Call:
## lm(formula = cover ~ daily.sal.range.gt10 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt10 ph
## -132.1088 -0.2752 21.4750
summary (lm13)
##
## Call:
## lm(formula = cover ~ daily.sal.range.gt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -31.716 -8.691 1.084 10.013 26.708
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -132.1088 143.4407 -0.921 0.362
## daily.sal.range.gt10 -0.2752 0.2808 -0.980 0.333
## ph 21.4750 18.3060 1.173 0.247
##
## Residual standard error: 14.78 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.0401, Adjusted R-squared: -0.005607
## F-statistic: 0.8773 on 2 and 42 DF, p-value: 0.4234
anova (lm13)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt10 1 82.7 82.668 0.3785 0.5417
## ph 1 300.6 300.605 1.3762 0.2474
## Residuals 42 9174.2 218.433
plot (lm13)
Effect of salinity and pH on percent cover: number of days with a daily salinity range greater than 5
lm14 <- lm(cover ~ daily.sal.range.gt5 +ph, data =all)
lm14
##
## Call:
## lm(formula = cover ~ daily.sal.range.gt5 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt5 ph
## -82.3446 -0.3791 15.5111
summary (lm14)
##
## Call:
## lm(formula = cover ~ daily.sal.range.gt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -30.632 -9.470 1.619 9.596 25.098
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -82.3446 133.7847 -0.616 0.542
## daily.sal.range.gt5 -0.3791 0.2540 -1.492 0.143
## ph 15.5111 16.9504 0.915 0.365
##
## Residual standard error: 14.57 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.06759, Adjusted R-squared: 0.02319
## F-statistic: 1.522 on 2 and 42 DF, p-value: 0.23
anova (lm14)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt5 1 468.3 468.32 2.2072 0.1448
## ph 1 177.7 177.67 0.8374 0.3654
## Residuals 42 8911.5 212.18
plot (lm14)
Different pH terms
Data for pH: ph (median pH), daily.min.ph (daily minimum pH), daily.max.ph (daily maximum pH), daily.ph.range (daily pH range), daily.med.ph (daily median pH), min.daily.ph.lt7/8 (number of days with a daily minimum pH less than 7 and 8), max.daily.ph.lt7 (number of days with a daily maximum pH less than 7), and daily.ph.range.gt0.5 (number of days with a daily pH range greater than 0.5)
Effect salinity and pH on percent cover: daily minimum ph
lm3 <- lm(cover ~ daily.min.ph + salinity, data =all)
lm3
##
## Call:
## lm(formula = cover ~ daily.min.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.min.ph salinity
## -173.2523 25.9317 0.2199
summary (lm3)
##
## Call:
## lm(formula = cover ~ daily.min.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -30.050 -9.531 2.423 8.798 25.536
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -173.2523 185.1600 -0.936 0.355
## daily.min.ph 25.9317 23.5415 1.102 0.277
## salinity 0.2199 0.3156 0.697 0.490
##
## Residual standard error: 14.83 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.0341, Adjusted R-squared: -0.0119
## F-statistic: 0.7413 on 2 and 42 DF, p-value: 0.4826
anova (lm3)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.ph 1 219.1 219.14 0.9970 0.3238
## salinity 1 106.7 106.73 0.4856 0.4898
## Residuals 42 9231.6 219.80
plot (lm3)
Effect salinity and pH on percent cover: daily maximum ph
lm4 <- lm(cover ~ daily.max.ph + salinity, data =all)
lm4
##
## Call:
## lm(formula = cover ~ daily.max.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.max.ph salinity
## -72.9611 12.8772 0.1915
summary (lm4)
##
## Call:
## lm(formula = cover ~ daily.max.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -29.714 -10.848 2.389 10.283 25.393
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -72.9611 100.8935 -0.723 0.474
## daily.max.ph 12.8772 12.5172 1.029 0.309
## salinity 0.1915 0.3130 0.612 0.544
##
## Residual standard error: 14.85 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.03062, Adjusted R-squared: -0.01554
## F-statistic: 0.6633 on 2 and 42 DF, p-value: 0.5205
anova (lm4)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.ph 1 210.1 210.084 0.9524 0.3347
## salinity 1 82.5 82.547 0.3742 0.5440
## Residuals 42 9264.8 220.591
plot (lm4)
Effect of salinity and pH on percent cover: daily ph range
lm5 <- lm(cover ~ daily.ph.range + salinity, data =all)
lm5
##
## Call:
## lm(formula = cover ~ daily.ph.range + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range salinity
## 30.4977 -2.4914 0.2163
summary (lm5)
##
## Call:
## lm(formula = cover ~ daily.ph.range + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -28.790 -7.752 1.405 10.218 24.666
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 30.4977 7.5265 4.052 0.000215 ***
## daily.ph.range -2.4914 1.4089 -1.768 0.084271 .
## salinity 0.2163 0.3060 0.707 0.483608
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 14.51 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.07505, Adjusted R-squared: 0.03101
## F-statistic: 1.704 on 2 and 42 DF, p-value: 0.1943
anova (lm5)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range 1 612.2 612.19 2.9085 0.0955 .
## salinity 1 105.1 105.14 0.4995 0.4836
## Residuals 42 8840.1 210.48
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect salinity and pH on percent cover: daily median ph
lm6 <- lm(cover ~ daily.med.ph + salinity, data =all)
lm6
##
## Call:
## lm(formula = cover ~ daily.med.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.med.ph salinity
## -124.4823 19.5165 0.1993
summary (lm6)
##
## Call:
## lm(formula = cover ~ daily.med.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -29.480 -9.664 2.651 9.790 25.503
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -124.4823 132.6707 -0.938 0.353
## daily.med.ph 19.5165 16.6755 1.170 0.248
## salinity 0.1993 0.3122 0.638 0.527
##
## Residual standard error: 14.8 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.03758, Adjusted R-squared: -0.008251
## F-statistic: 0.82 on 2 and 42 DF, p-value: 0.4474
anova (lm6)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.ph 1 269.9 269.89 1.2323 0.2733
## salinity 1 89.3 89.27 0.4076 0.5267
## Residuals 42 9198.3 219.01
plot (lm6)
Effect salinity and pH on percent cover: number of days with a daily minimun ph less than 7
lm7 <- lm(cover ~ min.daily.ph.lt7 + salinity, data =all)
lm7
##
## Call:
## lm(formula = cover ~ min.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt7 salinity
## 30.82111 -0.08506 0.18316
summary (lm7)
##
## Call:
## lm(formula = cover ~ min.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -27.745 -9.324 2.348 11.137 25.657
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 30.82111 7.85903 3.922 0.000319 ***
## min.daily.ph.lt7 -0.08506 0.29609 -0.287 0.775316
## salinity 0.18316 0.32421 0.565 0.575118
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 15.02 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.00814, Adjusted R-squared: -0.03909
## F-statistic: 0.1723 on 2 and 42 DF, p-value: 0.8423
anova (lm7)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt7 1 5.8 5.758 0.0255 0.8739
## salinity 1 72.0 72.037 0.3192 0.5751
## Residuals 42 9479.7 225.707
plot (lm7)
Effect salinity and pH on percent cover: number of days with a daily minimun ph less than 8
lm7 <- lm(cover ~ min.daily.ph.lt8 + salinity, data =all)
lm7
##
## Call:
## lm(formula = cover ~ min.daily.ph.lt8 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt8 salinity
## 25.1075 0.2261 0.1484
summary (lm7)
##
## Call:
## lm(formula = cover ~ min.daily.ph.lt8 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -31.356 -9.074 4.115 9.784 25.374
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 25.1075 8.3195 3.018 0.00431 **
## min.daily.ph.lt8 0.2261 0.1430 1.581 0.12137
## salinity 0.1484 0.3067 0.484 0.63099
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 14.61 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.06202, Adjusted R-squared: 0.01735
## F-statistic: 1.388 on 2 and 42 DF, p-value: 0.2607
anova (lm7)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt8 1 542.7 542.75 2.5428 0.1183
## salinity 1 50.0 49.97 0.2341 0.6310
## Residuals 42 8964.7 213.45
plot (lm7)
Effect salinity and pH on percent cover: number of days with a daily maximum ph less than 7
lm10 <- lm(cover ~ max.daily.ph.lt7 + salinity, data =all)
lm10
##
## Call:
## lm(formula = cover ~ max.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) max.daily.ph.lt7 salinity
## 30.82111 -0.08506 0.18316
summary (lm10)
##
## Call:
## lm(formula = cover ~ max.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -27.745 -9.324 2.348 11.137 25.657
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 30.82111 7.85903 3.922 0.000319 ***
## max.daily.ph.lt7 -0.08506 0.29609 -0.287 0.775316
## salinity 0.18316 0.32421 0.565 0.575118
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 15.02 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.00814, Adjusted R-squared: -0.03909
## F-statistic: 0.1723 on 2 and 42 DF, p-value: 0.8423
anova (lm10)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.ph.lt7 1 5.8 5.758 0.0255 0.8739
## salinity 1 72.0 72.037 0.3192 0.5751
## Residuals 42 9479.7 225.707
plot (lm10)
Effect salinity and pH on percent cover: number of days with a daily ph range greater than 0.5
lm13 <- lm(cover ~ daily.ph.range.gt0.5 +salinity, data =all)
lm13
##
## Call:
## lm(formula = cover ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range.gt0.5 salinity
## 30.500259 0.007668 0.159347
summary (lm13)
##
## Call:
## lm(formula = cover ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -28.18 -10.60 2.24 10.84 25.90
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 30.500259 7.882725 3.869 0.000374 ***
## daily.ph.range.gt0.5 0.007668 0.280358 0.027 0.978310
## salinity 0.159347 0.324385 0.491 0.625823
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 15.04 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.006208, Adjusted R-squared: -0.04111
## F-statistic: 0.1312 on 2 and 42 DF, p-value: 0.8774
anova (lm13)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range.gt0.5 1 4.8 4.767 0.0211 0.8853
## salinity 1 54.6 54.570 0.2413 0.6258
## Residuals 42 9498.1 226.146
plot (lm13)
####Q1.3 Effect of salinity and pH on density of large thalli#### Different salinity terms first
Effect of pH and salinity on density of small thalli
lm1 <- lm(no.small.fuc.q ~ salinity + ph + salinity:ph, data =all)
lm1
##
## Call:
## lm(formula = no.small.fuc.q ~ salinity + ph + salinity:ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph salinity:ph
## 591.555 -34.246 -77.736 4.661
summary (lm1)
##
## Call:
## lm(formula = no.small.fuc.q ~ salinity + ph + salinity:ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.95 -22.58 -11.00 11.88 104.52
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 591.555 1473.667 0.401 0.690
## salinity -34.246 66.946 -0.512 0.612
## ph -77.736 186.482 -0.417 0.679
## salinity:ph 4.661 8.480 0.550 0.586
##
## Residual standard error: 33.83 on 38 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.251, Adjusted R-squared: 0.1919
## F-statistic: 4.245 on 3 and 38 DF, p-value: 0.01108
anova (lm1)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 13947 13946.9 12.1831 0.001238 **
## ph 1 287 287.0 0.2507 0.619484
## salinity:ph 1 346 345.8 0.3021 0.585788
## Residuals 38 43501 1144.8
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm1)
Effect of pH and salinity on density of small thalli, interaction term removed
lm2 <- lm(no.small.fuc.q ~ salinity + ph, data =all)
lm2
##
## Call:
## lm(formula = no.small.fuc.q ~ salinity + ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph
## -195.539 2.548 21.900
summary (lm2)
##
## Call:
## lm(formula = no.small.fuc.q ~ salinity + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.181 -23.278 -5.598 11.485 105.143
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -195.5391 344.6575 -0.567 0.574
## salinity 2.5480 0.7162 3.557 0.001 **
## ph 21.9004 43.3482 0.505 0.616
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.53 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2451, Adjusted R-squared: 0.2064
## F-statistic: 6.33 on 2 and 39 DF, p-value: 0.004161
anova (lm2)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 13947 13946.9 12.4051 0.001109 **
## ph 1 287 287.0 0.2552 0.616247
## Residuals 39 43847 1124.3
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm2)
Effect and salinity and pH on density of small thalli: daily minimum salinity
lm3 <- lm(no.small.fuc.q ~ daily.min.sal + ph, data =all)
lm3
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.min.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.min.sal ph
## -132.052 2.357 15.094
summary (lm3)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.min.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.52 -24.29 -5.16 13.18 102.70
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -132.0517 338.8900 -0.390 0.69891
## daily.min.sal 2.3569 0.6393 3.687 0.00069 ***
## ph 15.0937 42.7636 0.353 0.72602
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.23 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2585, Adjusted R-squared: 0.2205
## F-statistic: 6.798 on 2 and 39 DF, p-value: 0.002932
anova (lm3)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.sal 1 14877 14876.7 13.4719 0.0007234 ***
## ph 1 138 137.6 0.1246 0.7260217
## Residuals 39 43067 1104.3
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect and salinity and pH on density of small thalli: daily maximum salinity
lm4 <- lm(no.small.fuc.q ~ daily.max.sal + ph, data =all)
lm4
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.max.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.max.sal ph
## -223.882 2.807 23.699
summary (lm4)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.max.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.55 -25.77 -10.17 11.76 106.30
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -223.8822 359.1727 -0.623 0.53670
## daily.max.sal 2.8072 0.9145 3.070 0.00389 **
## ph 23.6990 44.9415 0.527 0.60095
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 34.63 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1947, Adjusted R-squared: 0.1534
## F-statistic: 4.714 on 2 and 39 DF, p-value: 0.01466
anova (lm4)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.sal 1 10974 10974.5 9.1507 0.004384 **
## ph 1 333 333.5 0.2781 0.600952
## Residuals 39 46773 1199.3
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm4)
Effect and salinity and pH on density of small thalli: daily salinity range
lm5 <- lm(no.small.fuc.q ~ daily.sal.range + ph, data =all)
lm5
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.sal.range + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range ph
## 97.517 -2.606 -6.007
summary (lm5)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.sal.range + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -38.402 -26.647 -7.667 10.943 106.768
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 97.517 373.086 0.261 0.7952
## daily.sal.range -2.606 1.254 -2.079 0.0443 *
## ph -6.007 47.182 -0.127 0.8993
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 36.61 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.09982, Adjusted R-squared: 0.05366
## F-statistic: 2.162 on 2 and 39 DF, p-value: 0.1286
anova (lm5)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range 1 5776 5776.1 4.3086 0.04456 *
## ph 1 22 21.7 0.0162 0.89935
## Residuals 39 52283 1340.6
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect and salinity and pH on density of small thalli: daily median salinity
lm6 <- lm(no.small.fuc.q ~ daily.med.sal + ph, data =all)
lm6
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.med.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.med.sal ph
## -192.276 2.527 21.598
summary (lm6)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.med.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -38.612 -22.907 -5.843 11.544 105.248
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -192.2764 345.3734 -0.557 0.5809
## daily.med.sal 2.5270 0.7172 3.524 0.0011 **
## ph 21.5982 43.4432 0.497 0.6219
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.61 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2416, Adjusted R-squared: 0.2027
## F-statistic: 6.211 on 2 and 39 DF, p-value: 0.004555
anova (lm6)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.sal 1 13751 13750.7 12.1739 0.001218 **
## ph 1 279 279.2 0.2472 0.621867
## Residuals 39 44051 1129.5
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect of salinity and pH on density of small thalli: number of days with a daily minimun salinity less than 5
lm7 <- lm(no.small.fuc.q ~ min.daily.sal.lt5 + ph, data =all)
lm7
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt5 ph
## 23.48801 0.09737 1.60765
summary (lm7)
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -33.047 -24.145 -19.666 9.549 111.814
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 23.48801 399.39526 0.059 0.953
## min.daily.sal.lt5 0.09737 0.77100 0.126 0.900
## ph 1.60765 50.81535 0.032 0.975
##
## Residual standard error: 38.58 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.0005065, Adjusted R-squared: -0.05075
## F-statistic: 0.009881 on 2 and 39 DF, p-value: 0.9902
anova (lm7)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt5 1 28 27.93 0.0188 0.8918
## ph 1 1 1.49 0.0010 0.9749
## Residuals 39 58052 1488.50
plot (lm7)
Effect of salinity and pH on density of small thalli: number of days with a daily minimun salinity less than 10
lm8 <- lm(no.small.fuc.q ~ min.daily.sal.lt10 + ph, data =all)
lm8
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt10 ph
## -99.780 -0.862 18.758
summary (lm8)
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -36.52 -25.02 -16.69 18.13 100.56
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -99.7797 395.1073 -0.253 0.802
## min.daily.sal.lt10 -0.8620 0.7164 -1.203 0.236
## ph 18.7578 50.3409 0.373 0.711
##
## Residual standard error: 37.89 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.03589, Adjusted R-squared: -0.01356
## F-statistic: 0.7258 on 2 and 39 DF, p-value: 0.4904
anova (lm8)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt10 1 1885 1884.89 1.3128 0.2589
## ph 1 199 199.35 0.1388 0.7115
## Residuals 39 55997 1435.81
plot (lm8)
Effect of salinity and pH on density of small thalli: number of days with a daily minimun salinity less than 15
lm9 <- lm(no.small.fuc.q ~ min.daily.sal.lt15 +ph , data =all)
lm9
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt15 ph
## -14.641 -1.246 8.853
summary (lm9)
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -42.05 -25.54 -13.87 19.36 94.05
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -14.6413 373.9772 -0.039 0.9690
## min.daily.sal.lt15 -1.2459 0.6506 -1.915 0.0629 .
## ph 8.8526 47.4353 0.187 0.8529
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 36.89 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.08603, Adjusted R-squared: 0.03916
## F-statistic: 1.836 on 2 and 39 DF, p-value: 0.173
anova (lm9)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt15 1 4950 4949.6 3.6364 0.06392 .
## ph 1 47 47.4 0.0348 0.85292
## Residuals 39 53084 1361.1
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm9)
Effect of salinity and pH on percent no.small.fuc.q: number of days with a daily maximum salinity less than 5
lm10 <- lm(no.small.fuc.q ~ max.daily.sal.lt5 +ph, data =all)
lm10
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt5 ph
## 29.5327 0.1109 0.8209
summary (lm10)
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -32.811 -24.088 -19.610 9.479 111.971
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 29.5327 405.9512 0.073 0.942
## max.daily.sal.lt5 0.1109 0.7411 0.150 0.882
## ph 0.8209 51.7059 0.016 0.987
##
## Residual standard error: 38.58 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.0006711, Adjusted R-squared: -0.05058
## F-statistic: 0.0131 on 2 and 39 DF, p-value: 0.987
anova (lm10)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt5 1 39 38.61 0.0259 0.8729
## ph 1 0 0.38 0.0003 0.9874
## Residuals 39 58042 1488.26
plot (lm10)
Effect of salinity and pH on density of small thalli: number of days with a daily maximum salinity less than 10
lm11 <- lm(no.small.fuc.q ~ max.daily.sal.lt10 +ph, data =all)
lm11
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt10 ph
## 0.56153 -0.08363 4.75928
summary (lm11)
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -35.15 -25.27 -18.95 11.37 110.02
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.56153 406.72997 0.001 0.999
## max.daily.sal.lt10 -0.08363 0.75313 -0.111 0.912
## ph 4.75928 51.82753 0.092 0.927
##
## Residual standard error: 38.58 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.0004137, Adjusted R-squared: -0.05085
## F-statistic: 0.008071 on 2 and 39 DF, p-value: 0.992
anova (lm11)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt10 1 11 11.48 0.0077 0.9305
## ph 1 13 12.55 0.0084 0.9273
## Residuals 39 58057 1488.64
plot (lm11)
Effect of salinity and pH on density of small thalli: number of days with a daily maximum salinity less than 15
lm12 <- lm(no.small.fuc.q ~ max.daily.sal.lt15 +ph, data =all)
lm12
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt15 ph
## -104.4956 -0.6662 18.9982
summary (lm12)
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -37.92 -25.12 -16.79 16.10 103.18
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -104.4956 406.9142 -0.257 0.799
## max.daily.sal.lt15 -0.6662 0.7188 -0.927 0.360
## ph 18.9982 51.9103 0.366 0.716
##
## Residual standard error: 38.17 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.02165, Adjusted R-squared: -0.02853
## F-statistic: 0.4314 on 2 and 39 DF, p-value: 0.6526
anova (lm12)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt15 1 1062 1062.10 0.7290 0.3984
## ph 1 195 195.16 0.1339 0.7164
## Residuals 39 56824 1457.02
plot (lm12)
Effect of salinity and pH on density of small thalli: number of days with a daily salinity range greater than 10
lm13 <- lm(no.small.fuc.q ~ daily.sal.range.gt10 +ph, data =all)
lm13
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.sal.range.gt10 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt10 ph
## 21.38062 0.06487 1.91485
summary (lm13)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.sal.range.gt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -33.36 -24.40 -19.62 9.93 111.53
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 21.38062 402.37896 0.053 0.958
## daily.sal.range.gt10 0.06487 0.74733 0.087 0.931
## ph 1.91485 51.22591 0.037 0.970
##
## Residual standard error: 38.59 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.0002908, Adjusted R-squared: -0.05098
## F-statistic: 0.005672 on 2 and 39 DF, p-value: 0.9943
anova (lm13)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt10 1 15 14.81 0.0099 0.9211
## ph 1 2 2.08 0.0014 0.9704
## Residuals 39 58064 1488.82
plot (lm13)
Effect of salinity and pH on density of small thalli: number of days with a daily salinity range greater than 5
lm14 <- lm(no.small.fuc.q ~ daily.sal.range.gt5 +ph, data =all)
lm14
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.sal.range.gt5 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt5 ph
## 46.668 -1.176 1.020
summary (lm14)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.sal.range.gt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -35.27 -26.87 -15.15 20.22 94.55
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 46.6678 376.5033 0.124 0.9020
## daily.sal.range.gt5 -1.1755 0.6634 -1.772 0.0842 .
## ph 1.0199 47.6474 0.021 0.9830
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 37.12 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.07461, Adjusted R-squared: 0.02715
## F-statistic: 1.572 on 2 and 39 DF, p-value: 0.2205
anova (lm14)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt5 1 4333 4332.7 3.1439 0.08402 .
## ph 1 1 0.6 0.0005 0.98303
## Residuals 39 53748 1378.1
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm14)
Different pH terms
Data for pH: ph (median pH), daily.min.ph (daily minimum pH), daily.max.ph (daily maximum pH), daily.ph.range (daily pH range), daily.med.ph (daily median pH), min.daily.ph.lt7/8 (number of days with a daily minimum pH less than 7 and 8), max.daily.ph.lt7 (number of days with a daily maximum pH less than 7), and daily.ph.range.gt0.5 (number of days with a daily pH range greater than 0.5)
Effect salinity and pH on percent density of small thalli: daily minimum ph
lm3 <- lm(no.small.fuc.q ~ daily.min.ph + salinity, data =all)
lm3
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.min.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.min.ph salinity
## 133.781 -19.763 2.458
summary (lm3)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.min.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.39 -24.09 -7.07 12.03 104.30
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 133.7814 434.9442 0.308 0.76004
## daily.min.ph -19.7632 55.2639 -0.358 0.72256
## salinity 2.4583 0.7233 3.399 0.00157 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.58 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2426, Adjusted R-squared: 0.2038
## F-statistic: 6.246 on 2 and 39 DF, p-value: 0.004433
anova (lm3)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.ph 1 1060 1060.0 0.9398 0.338309
## salinity 1 13031 13031.1 11.5529 0.001572 **
## Residuals 39 43990 1127.9
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect salinity and pH on density of small thalli: daily maximum ph
lm4 <- lm(no.small.fuc.q ~ daily.max.ph + salinity, data =all)
lm4
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.max.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.max.ph salinity
## -283.171 32.504 2.601
summary (lm4)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.max.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -43.49 -23.25 -9.67 11.66 96.26
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -283.1711 235.3741 -1.203 0.23620
## daily.max.ph 32.5037 29.1734 1.114 0.27203
## salinity 2.6015 0.7076 3.677 0.00071 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.12 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2636, Adjusted R-squared: 0.2258
## F-statistic: 6.979 on 2 and 39 DF, p-value: 0.002565
anova (lm4)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.ph 1 483 482.8 0.4403 0.5109011
## salinity 1 14825 14825.4 13.5178 0.0007104 ***
## Residuals 39 42773 1096.7
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm4)
Effect of salinity and pH on density of small thalli: daily ph range
lm5 <- lm(no.small.fuc.q ~ daily.ph.range + salinity, data =all)
lm5
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.ph.range + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range salinity
## -21.718 -3.802 2.592
summary (lm5)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.ph.range + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -41.889 -22.940 -3.613 10.334 104.912
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -21.7182 17.2378 -1.260 0.215188
## daily.ph.range -3.8016 3.2149 -1.183 0.244163
## salinity 2.5921 0.7047 3.678 0.000707 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.05 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2664, Adjusted R-squared: 0.2288
## F-statistic: 7.082 on 2 and 39 DF, p-value: 0.002377
anova (lm5)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range 1 694 693.9 0.6352 0.4302816
## salinity 1 14781 14780.6 13.5294 0.0007071 ***
## Residuals 39 42607 1092.5
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect salinity and pH on density of small thalli: daily median ph
lm6 <- lm(no.small.fuc.q ~ daily.med.ph + salinity, data =all)
lm6
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.med.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.med.ph salinity
## -145.404 15.564 2.541
summary (lm6)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.med.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -40.21 -23.82 -5.84 11.52 104.47
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -145.4045 312.2875 -0.466 0.64408
## daily.med.ph 15.5639 39.2082 0.397 0.69356
## salinity 2.5410 0.7179 3.539 0.00106 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.57 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2432, Adjusted R-squared: 0.2044
## F-statistic: 6.266 on 2 and 39 DF, p-value: 0.004368
anova (lm6)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.ph 1 5 5.0 0.0045 0.947086
## salinity 1 14119 14119.4 12.5273 0.001055 **
## Residuals 39 43957 1127.1
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect salinity and pH on density of small thalli: number of days with a daily minimun ph less than 7
lm7 <- lm(no.small.fuc.q ~ min.daily.ph.lt7 + salinity, data =all)
lm7
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt7 salinity
## -18.0806 -0.9547 2.7443
summary (lm7)
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -37.046 -25.895 -7.856 14.993 96.607
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -18.0806 17.2608 -1.047 0.301321
## min.daily.ph.lt7 -0.9547 0.6565 -1.454 0.153889
## salinity 2.7443 0.7140 3.843 0.000436 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 32.76 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2792, Adjusted R-squared: 0.2422
## F-statistic: 7.554 on 2 and 39 DF, p-value: 0.001688
anova (lm7)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt7 1 361 360.7 0.3361 0.5654482
## salinity 1 15856 15856.1 14.7714 0.0004361 ***
## Residuals 39 41864 1073.4
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect salinity and pH on density of small thalli: number of days with a daily minimun ph less than 8
lm7 <- lm(no.small.fuc.q ~ min.daily.ph.lt8 + salinity, data =all)
lm7
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.ph.lt8 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt8 salinity
## -19.98991 -0.06972 2.50940
summary (lm7)
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.ph.lt8 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -40.321 -24.424 -5.949 11.021 105.132
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -19.98991 19.24252 -1.039 0.30528
## min.daily.ph.lt8 -0.06972 0.33588 -0.208 0.83665
## salinity 2.50940 0.71332 3.518 0.00112 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.62 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.241, Adjusted R-squared: 0.202
## F-statistic: 6.191 on 2 and 39 DF, p-value: 0.004625
anova (lm7)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt8 1 6 6.1 0.0054 0.941759
## salinity 1 13989 13989.4 12.3757 0.001122 **
## Residuals 39 44085 1130.4
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect salinity and pH on density of small thalli: number of days with a daily maximum ph less than 7
lm10 <- lm(no.small.fuc.q ~ max.daily.ph.lt7 + salinity, data =all)
lm10
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) max.daily.ph.lt7 salinity
## -18.0806 -0.9547 2.7443
summary (lm10)
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -37.046 -25.895 -7.856 14.993 96.607
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -18.0806 17.2608 -1.047 0.301321
## max.daily.ph.lt7 -0.9547 0.6565 -1.454 0.153889
## salinity 2.7443 0.7140 3.843 0.000436 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 32.76 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2792, Adjusted R-squared: 0.2422
## F-statistic: 7.554 on 2 and 39 DF, p-value: 0.001688
anova (lm10)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.ph.lt7 1 361 360.7 0.3361 0.5654482
## salinity 1 15856 15856.1 14.7714 0.0004361 ***
## Residuals 39 41864 1073.4
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm10)
Effect salinity and pH on density of small thalli: number of days with a daily ph range greater than 0.5
lm13 <- lm(no.small.fuc.q ~ daily.ph.range.gt0.5 +salinity, data =all)
lm13
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.ph.range.gt0.5 + salinity,
## data = all)
##
## Coefficients:
## (Intercept) daily.ph.range.gt0.5 salinity
## -19.2967 -0.5207 2.6348
summary (lm13)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.ph.range.gt0.5 + salinity,
## data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -38.448 -24.466 -7.248 13.176 104.889
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -19.2967 17.6294 -1.095 0.280417
## daily.ph.range.gt0.5 -0.5207 0.6371 -0.817 0.418742
## salinity 2.6348 0.7251 3.634 0.000805 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.36 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2529, Adjusted R-squared: 0.2146
## F-statistic: 6.602 on 2 and 39 DF, p-value: 0.003393
anova (lm13)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range.gt0.5 1 0 0.2 0.0002 0.9887731
## salinity 1 14690 14689.8 13.2032 0.0008047 ***
## Residuals 39 43391 1112.6
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm13)
####Q1.4 Effect of salinity and pH on desnity of small thalli#### Different salinity terms first
Effect of pH and salinity on density of small thalli
lm1 <- lm(no.small.fuc.q ~ salinity + ph + salinity:ph, data =all)
lm1
##
## Call:
## lm(formula = no.small.fuc.q ~ salinity + ph + salinity:ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph salinity:ph
## 591.555 -34.246 -77.736 4.661
summary (lm1)
##
## Call:
## lm(formula = no.small.fuc.q ~ salinity + ph + salinity:ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.95 -22.58 -11.00 11.88 104.52
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 591.555 1473.667 0.401 0.690
## salinity -34.246 66.946 -0.512 0.612
## ph -77.736 186.482 -0.417 0.679
## salinity:ph 4.661 8.480 0.550 0.586
##
## Residual standard error: 33.83 on 38 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.251, Adjusted R-squared: 0.1919
## F-statistic: 4.245 on 3 and 38 DF, p-value: 0.01108
anova (lm1)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 13947 13946.9 12.1831 0.001238 **
## ph 1 287 287.0 0.2507 0.619484
## salinity:ph 1 346 345.8 0.3021 0.585788
## Residuals 38 43501 1144.8
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm1)
Effect of pH and salinity on density of small thalli, interaction term removed
lm2 <- lm(no.small.fuc.q ~ salinity + ph, data =all)
lm2
##
## Call:
## lm(formula = no.small.fuc.q ~ salinity + ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph
## -195.539 2.548 21.900
summary (lm2)
##
## Call:
## lm(formula = no.small.fuc.q ~ salinity + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.181 -23.278 -5.598 11.485 105.143
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -195.5391 344.6575 -0.567 0.574
## salinity 2.5480 0.7162 3.557 0.001 **
## ph 21.9004 43.3482 0.505 0.616
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.53 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2451, Adjusted R-squared: 0.2064
## F-statistic: 6.33 on 2 and 39 DF, p-value: 0.004161
anova (lm2)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 13947 13946.9 12.4051 0.001109 **
## ph 1 287 287.0 0.2552 0.616247
## Residuals 39 43847 1124.3
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm2)
Effect and salinity and pH on density of small thalli: daily minimum salinity
lm3 <- lm(no.small.fuc.q ~ daily.min.sal + ph, data =all)
lm3
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.min.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.min.sal ph
## -132.052 2.357 15.094
summary (lm3)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.min.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.52 -24.29 -5.16 13.18 102.70
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -132.0517 338.8900 -0.390 0.69891
## daily.min.sal 2.3569 0.6393 3.687 0.00069 ***
## ph 15.0937 42.7636 0.353 0.72602
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.23 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2585, Adjusted R-squared: 0.2205
## F-statistic: 6.798 on 2 and 39 DF, p-value: 0.002932
anova (lm3)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.sal 1 14877 14876.7 13.4719 0.0007234 ***
## ph 1 138 137.6 0.1246 0.7260217
## Residuals 39 43067 1104.3
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect and salinity and pH on density of small thalli: daily maximum salinity
lm4 <- lm(no.small.fuc.q ~ daily.max.sal + ph, data =all)
lm4
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.max.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.max.sal ph
## -223.882 2.807 23.699
summary (lm4)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.max.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.55 -25.77 -10.17 11.76 106.30
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -223.8822 359.1727 -0.623 0.53670
## daily.max.sal 2.8072 0.9145 3.070 0.00389 **
## ph 23.6990 44.9415 0.527 0.60095
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 34.63 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1947, Adjusted R-squared: 0.1534
## F-statistic: 4.714 on 2 and 39 DF, p-value: 0.01466
anova (lm4)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.sal 1 10974 10974.5 9.1507 0.004384 **
## ph 1 333 333.5 0.2781 0.600952
## Residuals 39 46773 1199.3
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm4)
Effect and salinity and pH on density of small thalli: daily salinity range
lm5 <- lm(no.small.fuc.q ~ daily.sal.range + ph, data =all)
lm5
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.sal.range + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range ph
## 97.517 -2.606 -6.007
summary (lm5)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.sal.range + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -38.402 -26.647 -7.667 10.943 106.768
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 97.517 373.086 0.261 0.7952
## daily.sal.range -2.606 1.254 -2.079 0.0443 *
## ph -6.007 47.182 -0.127 0.8993
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 36.61 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.09982, Adjusted R-squared: 0.05366
## F-statistic: 2.162 on 2 and 39 DF, p-value: 0.1286
anova (lm5)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range 1 5776 5776.1 4.3086 0.04456 *
## ph 1 22 21.7 0.0162 0.89935
## Residuals 39 52283 1340.6
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect and salinity and pH on density of small thalli: daily median salinity
lm6 <- lm(no.small.fuc.q ~ daily.med.sal + ph, data =all)
lm6
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.med.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.med.sal ph
## -192.276 2.527 21.598
summary (lm6)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.med.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -38.612 -22.907 -5.843 11.544 105.248
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -192.2764 345.3734 -0.557 0.5809
## daily.med.sal 2.5270 0.7172 3.524 0.0011 **
## ph 21.5982 43.4432 0.497 0.6219
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.61 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2416, Adjusted R-squared: 0.2027
## F-statistic: 6.211 on 2 and 39 DF, p-value: 0.004555
anova (lm6)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.sal 1 13751 13750.7 12.1739 0.001218 **
## ph 1 279 279.2 0.2472 0.621867
## Residuals 39 44051 1129.5
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect of salinity and pH on density of small thalli: number of days with a daily minimun salinity less than 5
lm7 <- lm(no.small.fuc.q ~ min.daily.sal.lt5 + ph, data =all)
lm7
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt5 ph
## 23.48801 0.09737 1.60765
summary (lm7)
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -33.047 -24.145 -19.666 9.549 111.814
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 23.48801 399.39526 0.059 0.953
## min.daily.sal.lt5 0.09737 0.77100 0.126 0.900
## ph 1.60765 50.81535 0.032 0.975
##
## Residual standard error: 38.58 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.0005065, Adjusted R-squared: -0.05075
## F-statistic: 0.009881 on 2 and 39 DF, p-value: 0.9902
anova (lm7)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt5 1 28 27.93 0.0188 0.8918
## ph 1 1 1.49 0.0010 0.9749
## Residuals 39 58052 1488.50
plot (lm7)
Effect of salinity and pH on density of small thalli: number of days with a daily minimun salinity less than 10
lm8 <- lm(no.small.fuc.q ~ min.daily.sal.lt10 + ph, data =all)
lm8
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt10 ph
## -99.780 -0.862 18.758
summary (lm8)
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -36.52 -25.02 -16.69 18.13 100.56
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -99.7797 395.1073 -0.253 0.802
## min.daily.sal.lt10 -0.8620 0.7164 -1.203 0.236
## ph 18.7578 50.3409 0.373 0.711
##
## Residual standard error: 37.89 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.03589, Adjusted R-squared: -0.01356
## F-statistic: 0.7258 on 2 and 39 DF, p-value: 0.4904
anova (lm8)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt10 1 1885 1884.89 1.3128 0.2589
## ph 1 199 199.35 0.1388 0.7115
## Residuals 39 55997 1435.81
plot (lm8)
Effect of salinity and pH on density of small thalli: number of days with a daily minimun salinity less than 15
lm9 <- lm(no.small.fuc.q ~ min.daily.sal.lt15 +ph , data =all)
lm9
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt15 ph
## -14.641 -1.246 8.853
summary (lm9)
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -42.05 -25.54 -13.87 19.36 94.05
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -14.6413 373.9772 -0.039 0.9690
## min.daily.sal.lt15 -1.2459 0.6506 -1.915 0.0629 .
## ph 8.8526 47.4353 0.187 0.8529
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 36.89 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.08603, Adjusted R-squared: 0.03916
## F-statistic: 1.836 on 2 and 39 DF, p-value: 0.173
anova (lm9)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt15 1 4950 4949.6 3.6364 0.06392 .
## ph 1 47 47.4 0.0348 0.85292
## Residuals 39 53084 1361.1
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm9)
Effect of salinity and pH on percent no.small.fuc.q: number of days with a daily maximum salinity less than 5
lm10 <- lm(no.small.fuc.q ~ max.daily.sal.lt5 +ph, data =all)
lm10
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt5 ph
## 29.5327 0.1109 0.8209
summary (lm10)
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -32.811 -24.088 -19.610 9.479 111.971
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 29.5327 405.9512 0.073 0.942
## max.daily.sal.lt5 0.1109 0.7411 0.150 0.882
## ph 0.8209 51.7059 0.016 0.987
##
## Residual standard error: 38.58 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.0006711, Adjusted R-squared: -0.05058
## F-statistic: 0.0131 on 2 and 39 DF, p-value: 0.987
anova (lm10)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt5 1 39 38.61 0.0259 0.8729
## ph 1 0 0.38 0.0003 0.9874
## Residuals 39 58042 1488.26
plot (lm10)
Effect of salinity and pH on density of small thalli: number of days with a daily maximum salinity less than 10
lm11 <- lm(no.small.fuc.q ~ max.daily.sal.lt10 +ph, data =all)
lm11
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt10 ph
## 0.56153 -0.08363 4.75928
summary (lm11)
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -35.15 -25.27 -18.95 11.37 110.02
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.56153 406.72997 0.001 0.999
## max.daily.sal.lt10 -0.08363 0.75313 -0.111 0.912
## ph 4.75928 51.82753 0.092 0.927
##
## Residual standard error: 38.58 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.0004137, Adjusted R-squared: -0.05085
## F-statistic: 0.008071 on 2 and 39 DF, p-value: 0.992
anova (lm11)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt10 1 11 11.48 0.0077 0.9305
## ph 1 13 12.55 0.0084 0.9273
## Residuals 39 58057 1488.64
plot (lm11)
Effect of salinity and pH on density of small thalli: number of days with a daily maximum salinity less than 15
lm12 <- lm(no.small.fuc.q ~ max.daily.sal.lt15 +ph, data =all)
lm12
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt15 ph
## -104.4956 -0.6662 18.9982
summary (lm12)
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -37.92 -25.12 -16.79 16.10 103.18
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -104.4956 406.9142 -0.257 0.799
## max.daily.sal.lt15 -0.6662 0.7188 -0.927 0.360
## ph 18.9982 51.9103 0.366 0.716
##
## Residual standard error: 38.17 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.02165, Adjusted R-squared: -0.02853
## F-statistic: 0.4314 on 2 and 39 DF, p-value: 0.6526
anova (lm12)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt15 1 1062 1062.10 0.7290 0.3984
## ph 1 195 195.16 0.1339 0.7164
## Residuals 39 56824 1457.02
plot (lm12)
Effect of salinity and pH on density of small thalli: number of days with a daily salinity range greater than 10
lm13 <- lm(no.small.fuc.q ~ daily.sal.range.gt10 +ph, data =all)
lm13
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.sal.range.gt10 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt10 ph
## 21.38062 0.06487 1.91485
summary (lm13)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.sal.range.gt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -33.36 -24.40 -19.62 9.93 111.53
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 21.38062 402.37896 0.053 0.958
## daily.sal.range.gt10 0.06487 0.74733 0.087 0.931
## ph 1.91485 51.22591 0.037 0.970
##
## Residual standard error: 38.59 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.0002908, Adjusted R-squared: -0.05098
## F-statistic: 0.005672 on 2 and 39 DF, p-value: 0.9943
anova (lm13)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt10 1 15 14.81 0.0099 0.9211
## ph 1 2 2.08 0.0014 0.9704
## Residuals 39 58064 1488.82
plot (lm13)
Effect of salinity and pH on density of small thalli: number of days with a daily salinity range greater than 5
lm14 <- lm(no.small.fuc.q ~ daily.sal.range.gt5 +ph, data =all)
lm14
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.sal.range.gt5 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt5 ph
## 46.668 -1.176 1.020
summary (lm14)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.sal.range.gt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -35.27 -26.87 -15.15 20.22 94.55
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 46.6678 376.5033 0.124 0.9020
## daily.sal.range.gt5 -1.1755 0.6634 -1.772 0.0842 .
## ph 1.0199 47.6474 0.021 0.9830
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 37.12 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.07461, Adjusted R-squared: 0.02715
## F-statistic: 1.572 on 2 and 39 DF, p-value: 0.2205
anova (lm14)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt5 1 4333 4332.7 3.1439 0.08402 .
## ph 1 1 0.6 0.0005 0.98303
## Residuals 39 53748 1378.1
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm14)
Different pH terms
Data for pH: ph (median pH), daily.min.ph (daily minimum pH), daily.max.ph (daily maximum pH), daily.ph.range (daily pH range), daily.med.ph (daily median pH), min.daily.ph.lt7/8 (number of days with a daily minimum pH less than 7 and 8), max.daily.ph.lt7 (number of days with a daily maximum pH less than 7), and daily.ph.range.gt0.5 (number of days with a daily pH range greater than 0.5)
Effect salinity and pH on percent density of small thalli: daily minimum ph
lm3 <- lm(no.small.fuc.q ~ daily.min.ph + salinity, data =all)
lm3
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.min.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.min.ph salinity
## 133.781 -19.763 2.458
summary (lm3)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.min.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.39 -24.09 -7.07 12.03 104.30
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 133.7814 434.9442 0.308 0.76004
## daily.min.ph -19.7632 55.2639 -0.358 0.72256
## salinity 2.4583 0.7233 3.399 0.00157 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.58 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2426, Adjusted R-squared: 0.2038
## F-statistic: 6.246 on 2 and 39 DF, p-value: 0.004433
anova (lm3)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.ph 1 1060 1060.0 0.9398 0.338309
## salinity 1 13031 13031.1 11.5529 0.001572 **
## Residuals 39 43990 1127.9
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect salinity and pH on density of small thalli: daily maximum ph
lm4 <- lm(no.small.fuc.q ~ daily.max.ph + salinity, data =all)
lm4
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.max.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.max.ph salinity
## -283.171 32.504 2.601
summary (lm4)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.max.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -43.49 -23.25 -9.67 11.66 96.26
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -283.1711 235.3741 -1.203 0.23620
## daily.max.ph 32.5037 29.1734 1.114 0.27203
## salinity 2.6015 0.7076 3.677 0.00071 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.12 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2636, Adjusted R-squared: 0.2258
## F-statistic: 6.979 on 2 and 39 DF, p-value: 0.002565
anova (lm4)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.ph 1 483 482.8 0.4403 0.5109011
## salinity 1 14825 14825.4 13.5178 0.0007104 ***
## Residuals 39 42773 1096.7
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm4)
Effect of salinity and pH on density of small thalli: daily ph range
lm5 <- lm(no.small.fuc.q ~ daily.ph.range + salinity, data =all)
lm5
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.ph.range + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range salinity
## -21.718 -3.802 2.592
summary (lm5)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.ph.range + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -41.889 -22.940 -3.613 10.334 104.912
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -21.7182 17.2378 -1.260 0.215188
## daily.ph.range -3.8016 3.2149 -1.183 0.244163
## salinity 2.5921 0.7047 3.678 0.000707 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.05 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2664, Adjusted R-squared: 0.2288
## F-statistic: 7.082 on 2 and 39 DF, p-value: 0.002377
anova (lm5)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range 1 694 693.9 0.6352 0.4302816
## salinity 1 14781 14780.6 13.5294 0.0007071 ***
## Residuals 39 42607 1092.5
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect salinity and pH on density of small thalli: daily median ph
lm6 <- lm(no.small.fuc.q ~ daily.med.ph + salinity, data =all)
lm6
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.med.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.med.ph salinity
## -145.404 15.564 2.541
summary (lm6)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.med.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -40.21 -23.82 -5.84 11.52 104.47
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -145.4045 312.2875 -0.466 0.64408
## daily.med.ph 15.5639 39.2082 0.397 0.69356
## salinity 2.5410 0.7179 3.539 0.00106 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.57 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2432, Adjusted R-squared: 0.2044
## F-statistic: 6.266 on 2 and 39 DF, p-value: 0.004368
anova (lm6)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.ph 1 5 5.0 0.0045 0.947086
## salinity 1 14119 14119.4 12.5273 0.001055 **
## Residuals 39 43957 1127.1
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect salinity and pH on density of small thalli: number of days with a daily minimun ph less than 7
lm7 <- lm(no.small.fuc.q ~ min.daily.ph.lt7 + salinity, data =all)
lm7
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt7 salinity
## -18.0806 -0.9547 2.7443
summary (lm7)
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -37.046 -25.895 -7.856 14.993 96.607
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -18.0806 17.2608 -1.047 0.301321
## min.daily.ph.lt7 -0.9547 0.6565 -1.454 0.153889
## salinity 2.7443 0.7140 3.843 0.000436 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 32.76 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2792, Adjusted R-squared: 0.2422
## F-statistic: 7.554 on 2 and 39 DF, p-value: 0.001688
anova (lm7)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt7 1 361 360.7 0.3361 0.5654482
## salinity 1 15856 15856.1 14.7714 0.0004361 ***
## Residuals 39 41864 1073.4
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect salinity and pH on density of small thalli: number of days with a daily minimun ph less than 8
lm7 <- lm(no.small.fuc.q ~ min.daily.ph.lt8 + salinity, data =all)
lm7
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.ph.lt8 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt8 salinity
## -19.98991 -0.06972 2.50940
summary (lm7)
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.ph.lt8 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -40.321 -24.424 -5.949 11.021 105.132
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -19.98991 19.24252 -1.039 0.30528
## min.daily.ph.lt8 -0.06972 0.33588 -0.208 0.83665
## salinity 2.50940 0.71332 3.518 0.00112 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.62 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.241, Adjusted R-squared: 0.202
## F-statistic: 6.191 on 2 and 39 DF, p-value: 0.004625
anova (lm7)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt8 1 6 6.1 0.0054 0.941759
## salinity 1 13989 13989.4 12.3757 0.001122 **
## Residuals 39 44085 1130.4
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect salinity and pH on density of small thalli: number of days with a daily maximum ph less than 7
lm10 <- lm(no.small.fuc.q ~ max.daily.ph.lt7 + salinity, data =all)
lm10
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) max.daily.ph.lt7 salinity
## -18.0806 -0.9547 2.7443
summary (lm10)
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -37.046 -25.895 -7.856 14.993 96.607
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -18.0806 17.2608 -1.047 0.301321
## max.daily.ph.lt7 -0.9547 0.6565 -1.454 0.153889
## salinity 2.7443 0.7140 3.843 0.000436 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 32.76 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2792, Adjusted R-squared: 0.2422
## F-statistic: 7.554 on 2 and 39 DF, p-value: 0.001688
anova (lm10)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.ph.lt7 1 361 360.7 0.3361 0.5654482
## salinity 1 15856 15856.1 14.7714 0.0004361 ***
## Residuals 39 41864 1073.4
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm10)
Effect salinity and pH on density of small thalli: number of days with a daily ph range greater than 0.5
lm13 <- lm(no.small.fuc.q ~ daily.ph.range.gt0.5 +salinity, data =all)
lm13
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.ph.range.gt0.5 + salinity,
## data = all)
##
## Coefficients:
## (Intercept) daily.ph.range.gt0.5 salinity
## -19.2967 -0.5207 2.6348
summary (lm13)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.ph.range.gt0.5 + salinity,
## data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -38.448 -24.466 -7.248 13.176 104.889
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -19.2967 17.6294 -1.095 0.280417
## daily.ph.range.gt0.5 -0.5207 0.6371 -0.817 0.418742
## salinity 2.6348 0.7251 3.634 0.000805 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.36 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2529, Adjusted R-squared: 0.2146
## F-statistic: 6.602 on 2 and 39 DF, p-value: 0.003393
anova (lm13)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range.gt0.5 1 0 0.2 0.0002 0.9887731
## salinity 1 14690 14689.8 13.2032 0.0008047 ***
## Residuals 39 43391 1112.6
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm13)
####Q2. Effects of salinity and pH on reproductive effort#### Data I have for reproductive effort: covcl.repro (cover class of reproductive tissue), dw.repro (dry weight of reproductive tissue), apices.repro (number of reproductive apices), perc.ra (percent of apices that are reproductive), avg.oog (average number of oogonia) and perc.rdw (percent of dry weight that is reproductive tissue)
Data for salinity: salinity (median salinity), daily.min.sal (daily minimun salinity), daily.max.sal (daily maximum salinity), daily.sal.range (daily salinity range), daily.med.sal (daily median salinity), min.daily.sal.lt5/10/15 (number of days with a minimun daily dalinity less than 5, 10, and 15), max.daily.sal.lt5/10/15 (number of days with a maximum daily salinity less than 5, 10, and 15) and daily.sal.range.gt5/10 (number of days with a daily salinity range greater than 5 and 10)
Data for pH: ph (median pH), daily.min.ph (daily minimum pH), daily.max.ph (daily maximum pH), daily.ph.range (daily pH range), daily.med.ph (daily median pH), min.daily.ph.lt7/8 (number of days with a daily minimum pH less than 7 and 8), max.daily.ph.lt7 (number of days with a daily maximum pH less than 7), and daily.ph.range.gt0.5 (number of days with a daily pH range greater than 0.5) ####Q2.1 Effects of salinity and pH on cover class of reproductive tissue#### Different salinity terms first
Effect of pH and salinity on cover class of reproductive tissue
lm1 <- lm(covcl.repro ~ salinity + ph + salinity:ph, data =all)
lm1
##
## Call:
## lm(formula = covcl.repro ~ salinity + ph + salinity:ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph salinity:ph
## -8.7659 0.8215 1.5278 -0.1099
summary (lm1)
##
## Call:
## lm(formula = covcl.repro ~ salinity + ph + salinity:ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.51736 -0.82441 0.06643 0.69227 2.33210
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -8.7659 40.5168 -0.216 0.830
## salinity 0.8215 1.7982 0.457 0.650
## ph 1.5278 5.1258 0.298 0.767
## salinity:ph -0.1099 0.2276 -0.483 0.632
##
## Residual standard error: 0.9798 on 41 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.121, Adjusted R-squared: 0.05672
## F-statistic: 1.882 on 3 and 41 DF, p-value: 0.1477
anova (lm1)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 4.623 4.6228 4.8157 0.03392 *
## ph 1 0.573 0.5734 0.5973 0.44405
## salinity:ph 1 0.224 0.2236 0.2329 0.63191
## Residuals 41 39.358 0.9600
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm1)
Effect of pH and salinity on cover class of reproductive tissue, interaction term removed
lm2 <- lm(covcl.repro ~ salinity + ph, data =all)
lm2
##
## Call:
## lm(formula = covcl.repro ~ salinity + ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph
## 10.29263 -0.04635 -0.88375
summary (lm2)
##
## Call:
## lm(formula = covcl.repro ~ salinity + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5771 -0.8418 0.0562 0.6848 2.2130
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 10.29263 8.99114 1.145 0.2588
## salinity -0.04635 0.02043 -2.268 0.0285 *
## ph -0.88375 1.13302 -0.780 0.4398
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9708 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.116, Adjusted R-squared: 0.07395
## F-statistic: 2.757 on 2 and 42 DF, p-value: 0.075
anova (lm2)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 4.623 4.6228 4.9053 0.03225 *
## ph 1 0.573 0.5734 0.6084 0.43977
## Residuals 42 39.582 0.9424
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm2)
Effect and salinity and pH on cover class of reproductive tissue: daily minimum salinity
lm3 <- lm(covcl.repro ~ daily.min.sal + ph, data =all)
lm3
##
## Call:
## lm(formula = covcl.repro ~ daily.min.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.min.sal ph
## 9.24285 -0.04474 -0.76815
summary (lm3)
##
## Call:
## lm(formula = covcl.repro ~ daily.min.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5529 -0.7777 0.1053 0.5568 2.2357
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.24285 8.85908 1.043 0.3028
## daily.min.sal -0.04474 0.01827 -2.449 0.0186 *
## ph -0.76815 1.12006 -0.686 0.4966
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9621 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.1318, Adjusted R-squared: 0.09041
## F-statistic: 3.187 on 2 and 42 DF, p-value: 0.05146
anova (lm3)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.sal 1 5.465 5.4645 5.9034 0.01947 *
## ph 1 0.435 0.4354 0.4703 0.49660
## Residuals 42 38.878 0.9257
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect and salinity and pH on cover class of reproductive tissue: daily maximum salinity
lm4 <- lm(covcl.repro ~ daily.max.sal + ph, data =all)
lm4
##
## Call:
## lm(formula = covcl.repro ~ daily.max.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.max.sal ph
## 10.31818 -0.04071 -0.88930
summary (lm4)
##
## Call:
## lm(formula = covcl.repro ~ daily.max.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.54759 -0.97042 -0.03736 0.83889 2.36405
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 10.31818 9.33983 1.105 0.276
## daily.max.sal -0.04071 0.02601 -1.565 0.125
## ph -0.88930 1.17067 -0.760 0.452
##
## Residual standard error: 0.9998 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.06243, Adjusted R-squared: 0.01779
## F-statistic: 1.398 on 2 and 42 DF, p-value: 0.2582
anova (lm4)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.sal 1 2.219 2.21884 2.2198 0.1437
## ph 1 0.577 0.57682 0.5771 0.4517
## Residuals 42 41.982 0.99957
plot (lm4)
Effect and salinity and pH on cover class of reproductive tissue: daily salinity range
lm5 <- lm(covcl.repro ~ daily.sal.range + ph, data =all)
lm5
##
## Call:
## lm(formula = covcl.repro ~ daily.sal.range + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range ph
## 4.8457 0.0717 -0.3771
summary (lm5)
##
## Call:
## lm(formula = covcl.repro ~ daily.sal.range + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.3920 -0.8882 0.0634 0.6154 2.6924
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.8457 9.0491 0.535 0.595
## daily.sal.range 0.0717 0.0331 2.166 0.036 *
## ph -0.3771 1.1440 -0.330 0.743
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9755 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.1074, Adjusted R-squared: 0.06494
## F-statistic: 2.528 on 2 and 42 DF, p-value: 0.09191
anova (lm5)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range 1 4.708 4.7077 4.9472 0.03156 *
## ph 1 0.103 0.1034 0.1087 0.74332
## Residuals 42 39.967 0.9516
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect and salinity and pH on cover class of reproductive tissue: daily median salinity
lm6 <- lm(covcl.repro ~ daily.med.sal + ph, data =all)
lm6
##
## Call:
## lm(formula = covcl.repro ~ daily.med.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.med.sal ph
## 10.20828 -0.04482 -0.87844
summary (lm6)
##
## Call:
## lm(formula = covcl.repro ~ daily.med.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.56463 -0.84769 0.04697 0.71379 2.21816
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 10.20828 9.02555 1.131 0.2645
## daily.med.sal -0.04482 0.02049 -2.188 0.0343 *
## ph -0.87844 1.13739 -0.772 0.4442
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9745 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.1093, Adjusted R-squared: 0.06685
## F-statistic: 2.576 on 2 and 42 DF, p-value: 0.08804
anova (lm6)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.sal 1 4.326 4.3263 4.5558 0.03869 *
## ph 1 0.566 0.5665 0.5965 0.44425
## Residuals 42 39.885 0.9496
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect of salinity and pH on cover class of reproductive tissue: number of days with a daily minimun salinity less than 5
lm7 <- lm(covcl.repro ~ min.daily.sal.lt5 + ph, data =all)
lm7
##
## Call:
## lm(formula = covcl.repro ~ min.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt5 ph
## 5.11483 -0.01704 -0.34397
summary (lm7)
##
## Call:
## lm(formula = covcl.repro ~ min.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.44926 -0.95458 -0.03976 0.69955 2.65393
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.11483 9.81278 0.521 0.605
## min.daily.sal.lt5 -0.01704 0.01990 -0.856 0.397
## ph -0.34397 1.25170 -0.275 0.785
##
## Residual standard error: 1.02 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.02477, Adjusted R-squared: -0.02167
## F-statistic: 0.5334 on 2 and 42 DF, p-value: 0.5905
anova (lm7)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt5 1 1.031 1.03063 0.9913 0.3251
## ph 1 0.079 0.07851 0.0755 0.7848
## Residuals 42 43.669 1.03973
plot (lm7)
Effect of salinity and pH on cover class of reproductive tissue: number of days with a daily minimun salinity less than 10
lm8 <- lm(covcl.repro ~ min.daily.sal.lt10 + ph, data =all)
lm8
##
## Call:
## lm(formula = covcl.repro ~ min.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt10 ph
## 11.19180 0.02091 -1.17050
summary (lm8)
##
## Call:
## lm(formula = covcl.repro ~ min.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.4885 -0.8487 -0.1482 0.6663 2.6494
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 11.19180 9.84578 1.137 0.262
## min.daily.sal.lt10 0.02091 0.01883 1.111 0.273
## ph -1.17050 1.25792 -0.931 0.357
##
## Residual standard error: 1.014 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.03606, Adjusted R-squared: -0.009842
## F-statistic: 0.7856 on 2 and 42 DF, p-value: 0.4624
anova (lm8)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt10 1 0.725 0.72489 0.7054 0.4057
## ph 1 0.890 0.88981 0.8658 0.3574
## Residuals 42 43.163 1.02769
plot (lm8)
Effect of salinity and pH on cover class of reproductive tissue: number of days with a daily minimun salinity less than 15
lm9 <- lm(covcl.repro ~ min.daily.sal.lt15 +ph , data =all)
lm9
##
## Call:
## lm(formula = covcl.repro ~ min.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt15 ph
## 10.40649 0.03342 -1.09753
summary (lm9)
##
## Call:
## lm(formula = covcl.repro ~ min.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.60501 -0.76945 -0.07025 0.66038 2.40448
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 10.40649 9.13338 1.139 0.2610
## min.daily.sal.lt15 0.03342 0.01676 1.995 0.0526 .
## ph -1.09753 1.16241 -0.944 0.3505
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.983 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.0936, Adjusted R-squared: 0.05043
## F-statistic: 2.168 on 2 and 42 DF, p-value: 0.127
anova (lm9)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt15 1 3.330 3.3296 3.4455 0.07045 .
## ph 1 0.861 0.8615 0.8915 0.35048
## Residuals 42 40.587 0.9664
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm9)
Effect of salinity and pH on cover class of reproductive tissue: number of days with a daily maximum salinity less than 5
lm10 <- lm(covcl.repro ~ max.daily.sal.lt5 +ph, data =all)
lm10
##
## Call:
## lm(formula = covcl.repro ~ max.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt5 ph
## 6.133029 -0.008221 -0.484522
summary (lm10)
##
## Call:
## lm(formula = covcl.repro ~ max.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.3940 -1.0842 -0.1244 0.7232 2.7514
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.133029 10.063524 0.609 0.546
## max.daily.sal.lt5 -0.008221 0.019392 -0.424 0.674
## ph -0.484522 1.284763 -0.377 0.708
##
## Residual standard error: 1.026 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.01197, Adjusted R-squared: -0.03508
## F-statistic: 0.2545 on 2 and 42 DF, p-value: 0.7765
anova (lm10)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt5 1 0.386 0.38634 0.3668 0.548
## ph 1 0.150 0.14982 0.1422 0.708
## Residuals 42 44.242 1.05337
plot (lm10)
Effect of salinity and pH on cover class of reproductive tissue: number of days with a daily maximum salinity less than 10
lm11 <- lm(covcl.repro ~ max.daily.sal.lt10 +ph, data =all)
lm11
##
## Call:
## lm(formula = covcl.repro ~ max.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt10 ph
## 5.80896 -0.00992 -0.44065
summary (lm11)
##
## Call:
## lm(formula = covcl.repro ~ max.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.4061 -1.0699 -0.1096 0.7151 2.7261
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.80896 10.08546 0.576 0.568
## max.daily.sal.lt10 -0.00992 0.01969 -0.504 0.617
## ph -0.44065 1.28827 -0.342 0.734
##
## Residual standard error: 1.025 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.01371, Adjusted R-squared: -0.03326
## F-statistic: 0.2918 on 2 and 42 DF, p-value: 0.7484
anova (lm11)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt10 1 0.491 0.49072 0.4667 0.4983
## ph 1 0.123 0.12302 0.1170 0.7340
## Residuals 42 44.164 1.05152
plot (lm11)
Effect of salinity and pH on cover class of reproductive tissue: number of days with a daily maximum salinity less than 15
lm12 <- lm(covcl.repro ~ max.daily.sal.lt15 +ph, data =all)
lm12
##
## Call:
## lm(formula = covcl.repro ~ max.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt15 ph
## 9.579685 0.009411 -0.947149
summary (lm12)
##
## Call:
## lm(formula = covcl.repro ~ max.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.3419 -1.0119 -0.1341 0.6860 2.7905
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.579685 10.213595 0.938 0.354
## max.daily.sal.lt15 0.009411 0.019079 0.493 0.624
## ph -0.947149 1.306128 -0.725 0.472
##
## Residual standard error: 1.026 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.01346, Adjusted R-squared: -0.03352
## F-statistic: 0.2865 on 2 and 42 DF, p-value: 0.7523
anova (lm12)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt15 1 0.050 0.04966 0.0472 0.8290
## ph 1 0.553 0.55309 0.5259 0.4724
## Residuals 42 44.175 1.05179
plot (lm12)
Effect of salinity and pH on cover class of reproductive tissue: number of days with a daily salinity range greater than 10
lm13 <- lm(covcl.repro ~ daily.sal.range.gt10 +ph, data =all)
lm13
##
## Call:
## lm(formula = covcl.repro ~ daily.sal.range.gt10 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt10 ph
## 6.828108 -0.004844 -0.577111
summary (lm13)
##
## Call:
## lm(formula = covcl.repro ~ daily.sal.range.gt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.3747 -1.1095 -0.1139 0.7363 2.7936
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.828108 9.975005 0.685 0.497
## daily.sal.range.gt10 -0.004844 0.019528 -0.248 0.805
## ph -0.577111 1.273019 -0.453 0.653
##
## Residual standard error: 1.028 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.009197, Adjusted R-squared: -0.03798
## F-statistic: 0.1949 on 2 and 42 DF, p-value: 0.8236
anova (lm13)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt10 1 0.195 0.19473 0.1843 0.6699
## ph 1 0.217 0.21709 0.2055 0.6526
## Residuals 42 44.366 1.05633
plot (lm13)
Effect of salinity and pH on cover class of reproductive tissue: number of days with a daily salinity range greater than 5
lm14 <- lm(covcl.repro ~ daily.sal.range.gt5 +ph, data =all)
lm14
##
## Call:
## lm(formula = covcl.repro ~ daily.sal.range.gt5 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt5 ph
## 7.37454 0.02273 -0.69623
summary (lm14)
##
## Call:
## lm(formula = covcl.repro ~ daily.sal.range.gt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.9229 -0.8971 -0.1017 0.6520 2.6269
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.37454 9.26418 0.796 0.430
## daily.sal.range.gt5 0.02273 0.01759 1.292 0.203
## ph -0.69623 1.17376 -0.593 0.556
##
## Residual standard error: 1.009 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.04569, Adjusted R-squared: 0.0002491
## F-statistic: 1.005 on 2 and 42 DF, p-value: 0.3745
anova (lm14)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt5 1 1.688 1.68803 1.6591 0.2048
## ph 1 0.358 0.35797 0.3518 0.5563
## Residuals 42 42.732 1.01742
plot (lm14)
Different pH terms
Data for pH: ph (median pH), daily.min.ph (daily minimum pH), daily.max.ph (daily maximum pH), daily.ph.range (daily pH range), daily.med.ph (daily median pH), min.daily.ph.lt7/8 (number of days with a daily minimum pH less than 7 and 8), max.daily.ph.lt7 (number of days with a daily maximum pH less than 7), and daily.ph.range.gt0.5 (number of days with a daily pH range greater than 0.5)
Effect salinity and pH on cover class of reproductive tissue: daily minimum ph
lm3 <- lm(covcl.repro ~ daily.min.ph + salinity, data =all)
lm3
##
## Call:
## lm(formula = covcl.repro ~ daily.min.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.min.ph salinity
## 5.20736 -0.24391 -0.04567
summary (lm3)
##
## Call:
## lm(formula = covcl.repro ~ daily.min.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.45632 -0.91051 0.04227 0.67781 2.26284
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.20736 12.20817 0.427 0.6719
## daily.min.ph -0.24391 1.55216 -0.157 0.8759
## salinity -0.04567 0.02081 -2.195 0.0338 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9775 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.1038, Adjusted R-squared: 0.06109
## F-statistic: 2.431 on 2 and 42 DF, p-value: 0.1002
anova (lm3)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.ph 1 0.044 0.0443 0.0463 0.83059
## salinity 1 4.602 4.6021 4.8164 0.03377 *
## Residuals 42 40.131 0.9555
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect salinity and pH on cover class of reproductive tissue: daily maximum ph
lm4 <- lm(covcl.repro ~ daily.max.ph + salinity, data =all)
lm4
##
## Call:
## lm(formula = covcl.repro ~ daily.max.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.max.ph salinity
## 10.43961 -0.88953 -0.04719
summary (lm4)
##
## Call:
## lm(formula = covcl.repro ~ daily.max.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.57396 -0.83045 -0.02016 0.70609 2.20917
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 10.43961 6.54944 1.594 0.1184
## daily.max.ph -0.88953 0.81255 -1.095 0.2799
## salinity -0.04719 0.02032 -2.323 0.0251 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9641 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.1281, Adjusted R-squared: 0.0866
## F-statistic: 3.086 on 2 and 42 DF, p-value: 0.05618
anova (lm4)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.ph 1 0.723 0.7226 0.7773 0.38297
## salinity 1 5.014 5.0143 5.3943 0.02512 *
## Residuals 42 39.041 0.9295
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm4)
Effect of salinity and pH on cover class of reproductive tissue: daily ph range
lm5 <- lm(covcl.repro ~ daily.ph.range + salinity, data =all)
lm5
##
## Call:
## lm(formula = covcl.repro ~ daily.ph.range + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range salinity
## 3.29131 0.05334 -0.04629
summary (lm5)
##
## Call:
## lm(formula = covcl.repro ~ daily.ph.range + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.3924 -0.9106 0.0689 0.6824 2.3229
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.29131 0.50535 6.513 7.26e-08 ***
## daily.ph.range 0.05334 0.09460 0.564 0.5759
## salinity -0.04629 0.02055 -2.253 0.0295 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9741 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.11, Adjusted R-squared: 0.06759
## F-statistic: 2.595 on 2 and 42 DF, p-value: 0.08658
anova (lm5)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range 1 0.108 0.1078 0.1136 0.73771
## salinity 1 4.817 4.8166 5.0761 0.02954 *
## Residuals 42 39.853 0.9489
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect salinity and pH on cover class of reproductive tissue: daily median ph
lm6 <- lm(covcl.repro ~ daily.med.ph + salinity, data =all)
lm6
##
## Call:
## lm(formula = covcl.repro ~ daily.med.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.med.ph salinity
## 9.99238 -0.84377 -0.04675
summary (lm6)
##
## Call:
## lm(formula = covcl.repro ~ daily.med.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.57664 -0.84448 0.05265 0.67386 2.19726
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.99238 8.70436 1.148 0.2575
## daily.med.ph -0.84377 1.09406 -0.771 0.4449
## salinity -0.04675 0.02048 -2.283 0.0276 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9709 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.1158, Adjusted R-squared: 0.07365
## F-statistic: 2.749 on 2 and 42 DF, p-value: 0.0755
anova (lm6)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.ph 1 0.272 0.2721 0.2886 0.59395
## salinity 1 4.911 4.9115 5.2099 0.02759 *
## Residuals 42 39.594 0.9427
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect salinity and pH on cover class of reproductive tissue: number of days with a daily minimun ph less than 7
lm7 <- lm(covcl.repro ~ min.daily.ph.lt7 + salinity, data =all)
lm7
##
## Call:
## lm(formula = covcl.repro ~ min.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt7 salinity
## 3.24221 0.01419 -0.04875
summary (lm7)
##
## Call:
## lm(formula = covcl.repro ~ min.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.29855 -0.86299 -0.07886 0.77366 2.40167
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.24221 0.50818 6.380 1.13e-07 ***
## min.daily.ph.lt7 0.01419 0.01915 0.741 0.463
## salinity -0.04875 0.02096 -2.325 0.025 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9715 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.1148, Adjusted R-squared: 0.07267
## F-statistic: 2.724 on 2 and 42 DF, p-value: 0.0772
anova (lm7)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt7 1 0.039 0.0392 0.0415 0.83947
## salinity 1 5.102 5.1023 5.4066 0.02497 *
## Residuals 42 39.636 0.9437
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect salinity and pH on cover class of reproductive tissue: number of days with a daily minimun ph less than 8
lm7 <- lm(covcl.repro ~ min.daily.ph.lt8 + salinity, data =all)
lm7
##
## Call:
## lm(formula = covcl.repro ~ min.daily.ph.lt8 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt8 salinity
## 3.344956 -0.002266 -0.044985
summary (lm7)
##
## Call:
## lm(formula = covcl.repro ~ min.daily.ph.lt8 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.36358 -0.90932 0.03209 0.72846 2.33484
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.344956 0.556423 6.012 3.82e-07 ***
## min.daily.ph.lt8 -0.002266 0.009563 -0.237 0.8139
## salinity -0.044985 0.020511 -2.193 0.0339 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9771 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.1044, Adjusted R-squared: 0.06179
## F-statistic: 2.449 on 2 and 42 DF, p-value: 0.09863
anova (lm7)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt8 1 0.084 0.0836 0.0876 0.76876
## salinity 1 4.593 4.5928 4.8103 0.03388 *
## Residuals 42 40.101 0.9548
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect salinity and pH on cover class of reproductive tissue: number of days with a daily maximum ph less than 7
lm10 <- lm(covcl.repro ~ max.daily.ph.lt7 + salinity, data =all)
lm10
##
## Call:
## lm(formula = covcl.repro ~ max.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) max.daily.ph.lt7 salinity
## 3.24221 0.01419 -0.04875
summary (lm10)
##
## Call:
## lm(formula = covcl.repro ~ max.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.29855 -0.86299 -0.07886 0.77366 2.40167
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.24221 0.50818 6.380 1.13e-07 ***
## max.daily.ph.lt7 0.01419 0.01915 0.741 0.463
## salinity -0.04875 0.02096 -2.325 0.025 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9715 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.1148, Adjusted R-squared: 0.07267
## F-statistic: 2.724 on 2 and 42 DF, p-value: 0.0772
anova (lm10)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.ph.lt7 1 0.039 0.0392 0.0415 0.83947
## salinity 1 5.102 5.1023 5.4066 0.02497 *
## Residuals 42 39.636 0.9437
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm10)
Effect salinity and pH on cover class of reproductive tissue: number of days with a daily ph range greater than 0.5
lm13 <- lm(covcl.repro ~ daily.ph.range.gt0.5 +salinity, data =all)
lm13
##
## Call:
## lm(formula = covcl.repro ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range.gt0.5 salinity
## 3.258127 0.008066 -0.047279
summary (lm13)
##
## Call:
## lm(formula = covcl.repro ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.3372 -0.8919 -0.0460 0.7696 2.3721
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.258127 0.511343 6.372 1.16e-07 ***
## daily.ph.range.gt0.5 0.008066 0.018186 0.444 0.66
## salinity -0.047279 0.021042 -2.247 0.03 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9755 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.1074, Adjusted R-squared: 0.06492
## F-statistic: 2.527 on 2 and 42 DF, p-value: 0.09196
anova (lm13)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range.gt0.5 1 0.006 0.0060 0.0063 0.93699
## salinity 1 4.804 4.8040 5.0483 0.02996 *
## Residuals 42 39.968 0.9516
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm13)
####Q2.2 Effects of salinity and pH on dry weight of reproductive tissue#### Different salinity terms first
Effect of pH and salinity on dry weight of reproductive tissue
lm1 <- lm(dw.repro ~ salinity + ph + salinity:ph, data =all)
lm1
##
## Call:
## lm(formula = dw.repro ~ salinity + ph + salinity:ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph salinity:ph
## 31.13562 -0.26994 -3.84309 0.03593
summary (lm1)
##
## Call:
## lm(formula = dw.repro ~ salinity + ph + salinity:ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.4688 -0.7341 -0.3593 0.6175 3.0439
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 31.13562 46.43263 0.671 0.507
## salinity -0.26994 2.07795 -0.130 0.897
## ph -3.84309 5.87522 -0.654 0.517
## salinity:ph 0.03593 0.26313 0.137 0.892
##
## Residual standard error: 1.103 on 38 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1399, Adjusted R-squared: 0.07196
## F-statistic: 2.06 on 3 and 38 DF, p-value: 0.1218
anova (lm1)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 0.779 0.7793 0.6406 0.4285
## ph 1 6.715 6.7149 5.5199 0.0241 *
## salinity:ph 1 0.023 0.0227 0.0186 0.8921
## Residuals 38 46.226 1.2165
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm1)
Effect of pH and salinity on dry weight of reproductive tissue, interaction term removed
lm2 <- lm(dw.repro ~ salinity + ph, data =all)
lm2
##
## Call:
## lm(formula = dw.repro ~ salinity + ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph
## 24.95524 0.01375 -3.06088
summary (lm2)
##
## Call:
## lm(formula = dw.repro ~ salinity + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.4016 -0.7319 -0.3559 0.6077 3.1059
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 24.95524 10.21256 2.444 0.0192 *
## salinity 0.01375 0.02325 0.592 0.5576
## ph -3.06088 1.28631 -2.380 0.0223 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.089 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1394, Adjusted R-squared: 0.09531
## F-statistic: 3.16 on 2 and 39 DF, p-value: 0.05348
anova (lm2)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 0.779 0.7793 0.6571 0.42249
## ph 1 6.715 6.7149 5.6624 0.02232 *
## Residuals 39 46.249 1.1859
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm2)
Effect and salinity and pH on dry weight of reproductive tissue: daily minimum salinity
lm3 <- lm(dw.repro ~ daily.min.sal + ph, data =all)
lm3
##
## Call:
## lm(formula = dw.repro ~ daily.min.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.min.sal ph
## 25.410152 0.009347 -3.102794
summary (lm3)
##
## Call:
## lm(formula = dw.repro ~ daily.min.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.4554 -0.7654 -0.3559 0.6382 3.0584
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 25.410152 10.168768 2.499 0.0168 *
## daily.min.sal 0.009347 0.021021 0.445 0.6590
## ph -3.102794 1.284943 -2.415 0.0205 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.091 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1361, Adjusted R-squared: 0.0918
## F-statistic: 3.072 on 2 and 39 DF, p-value: 0.05768
anova (lm3)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.sal 1 0.373 0.3730 0.3133 0.57885
## ph 1 6.942 6.9416 5.8309 0.02054 *
## Residuals 39 46.429 1.1905
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect and salinity and pH on dry weight of reproductive tissue: daily maximum salinity
lm4 <- lm(dw.repro ~ daily.max.sal + ph, data =all)
lm4
##
## Call:
## lm(formula = dw.repro ~ daily.max.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.max.sal ph
## 24.22918 0.02332 -3.00580
summary (lm4)
##
## Call:
## lm(formula = dw.repro ~ daily.max.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.3356 -0.7312 -0.3208 0.5439 3.1691
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 24.22918 10.25445 2.363 0.0232 *
## daily.max.sal 0.02332 0.02860 0.815 0.4198
## ph -3.00580 1.28496 -2.339 0.0245 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.085 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1463, Adjusted R-squared: 0.1025
## F-statistic: 3.341 on 2 and 39 DF, p-value: 0.04578
anova (lm4)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.sal 1 1.424 1.4239 1.2103 0.27801
## ph 1 6.438 6.4375 5.4720 0.02454 *
## Residuals 39 45.882 1.1765
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm4)
Effect and salinity and pH on dry weight of reproductive tissue: daily salinity range
lm5 <- lm(dw.repro ~ daily.sal.range + ph, data =all)
lm5
##
## Call:
## lm(formula = dw.repro ~ daily.sal.range + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range ph
## 25.504381 0.009469 -3.095616
summary (lm5)
##
## Call:
## lm(formula = dw.repro ~ daily.sal.range + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5806 -0.6953 -0.4310 0.5628 2.9431
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 25.504381 10.221208 2.495 0.0169 *
## daily.sal.range 0.009469 0.037438 0.253 0.8016
## ph -3.095616 1.292810 -2.394 0.0215 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.093 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1331, Adjusted R-squared: 0.08869
## F-statistic: 2.995 on 2 and 39 DF, p-value: 0.06165
anova (lm5)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range 1 0.307 0.3066 0.2567 0.61526
## ph 1 6.849 6.8490 5.7336 0.02155 *
## Residuals 39 46.587 1.1945
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect and salinity and pH on dry weight of reproductive tissue: daily median salinity
lm6 <- lm(dw.repro ~ daily.med.sal + ph, data =all)
lm6
##
## Call:
## lm(formula = dw.repro ~ daily.med.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.med.sal ph
## 24.83787 0.01559 -3.05116
summary (lm6)
##
## Call:
## lm(formula = dw.repro ~ daily.med.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.3838 -0.7273 -0.3620 0.6045 3.1260
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 24.83787 10.19975 2.435 0.0196 *
## daily.med.sal 0.01559 0.02321 0.672 0.5058
## ph -3.05116 1.28473 -2.375 0.0226 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.088 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1416, Adjusted R-squared: 0.09763
## F-statistic: 3.218 on 2 and 39 DF, p-value: 0.05087
anova (lm6)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.sal 1 0.941 0.9411 0.7956 0.37788
## ph 1 6.672 6.6716 5.6404 0.02257 *
## Residuals 39 46.130 1.1828
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect of salinity and pH on dry weight of reproductive tissue: number of days with a daily minimun salinity less than 5
lm7 <- lm(dw.repro ~ min.daily.sal.lt5 + ph, data =all)
lm7
##
## Call:
## lm(formula = dw.repro ~ min.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt5 ph
## 22.61891 -0.02302 -2.69329
summary (lm7)
##
## Call:
## lm(formula = dw.repro ~ min.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.6741 -0.6484 -0.3834 0.4912 2.8205
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 22.61891 10.45603 2.163 0.0367 *
## min.daily.sal.lt5 -0.02302 0.02173 -1.059 0.2960
## ph -2.69329 1.33391 -2.019 0.0504 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.078 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.156, Adjusted R-squared: 0.1127
## F-statistic: 3.604 on 2 and 39 DF, p-value: 0.03661
anova (lm7)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt5 1 3.643 3.6426 3.1319 0.08459 .
## ph 1 4.741 4.7415 4.0767 0.05039 .
## Residuals 39 45.359 1.1631
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect of salinity and pH on dry weight of reproductive tissue: number of days with a daily minimun salinity less than 10
lm8 <- lm(dw.repro ~ min.daily.sal.lt10 + ph, data =all)
lm8
##
## Call:
## lm(formula = dw.repro ~ min.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt10 ph
## 22.87712 -0.01797 -2.72730
summary (lm8)
##
## Call:
## lm(formula = dw.repro ~ min.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5367 -0.6482 -0.3788 0.5694 2.9988
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 22.87712 10.61648 2.155 0.0374 *
## min.daily.sal.lt10 -0.01797 0.02077 -0.865 0.3922
## ph -2.72730 1.35685 -2.010 0.0514 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.084 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1481, Adjusted R-squared: 0.1044
## F-statistic: 3.389 on 2 and 39 DF, p-value: 0.04394
anova (lm8)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt10 1 3.215 3.2149 2.7385 0.10598
## ph 1 4.743 4.7431 4.0402 0.05138 .
## Residuals 39 45.785 1.1740
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm8)
Effect of salinity and pH on dry weight of reproductive tissue: number of days with a daily minimun salinity less than 15
lm9 <- lm(dw.repro ~ min.daily.sal.lt15 +ph , data =all)
lm9
##
## Call:
## lm(formula = dw.repro ~ min.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt15 ph
## 25.178166 -0.008509 -3.032667
summary (lm9)
##
## Call:
## lm(formula = dw.repro ~ min.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.4790 -0.8003 -0.4077 0.5870 3.1237
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 25.178166 10.230774 2.461 0.0184 *
## min.daily.sal.lt15 -0.008509 0.019234 -0.442 0.6606
## ph -3.032667 1.302205 -2.329 0.0251 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.091 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1361, Adjusted R-squared: 0.09175
## F-statistic: 3.071 on 2 and 39 DF, p-value: 0.05774
anova (lm9)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt15 1 0.855 0.8552 0.7183 0.40186
## ph 1 6.457 6.4570 5.4236 0.02514 *
## Residuals 39 46.431 1.1905
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm9)
Effect of salinity and pH on dry weight of reproductive tissue: number of days with a daily maximum salinity less than 5
lm10 <- lm(dw.repro ~ max.daily.sal.lt5 +ph, data =all)
lm10
##
## Call:
## lm(formula = dw.repro ~ max.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt5 ph
## 23.53880 -0.01309 -2.82273
summary (lm10)
##
## Call:
## lm(formula = dw.repro ~ max.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.6302 -0.7704 -0.3788 0.5414 2.8873
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 23.53880 10.75667 2.188 0.0347 *
## max.daily.sal.lt5 -0.01309 0.02117 -0.618 0.5400
## ph -2.82273 1.37351 -2.055 0.0466 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.089 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1401, Adjusted R-squared: 0.09605
## F-statistic: 3.178 on 2 and 39 DF, p-value: 0.05263
anova (lm10)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt5 1 2.528 2.5276 2.1331 0.15216
## ph 1 5.004 5.0045 4.2236 0.04661 *
## Residuals 39 46.211 1.1849
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm10)
Effect of salinity and pH on dry weight of reproductive tissue: number of days with a daily maximum salinity less than 10
lm11 <- lm(dw.repro ~ max.daily.sal.lt10 +ph, data =all)
lm11
##
## Call:
## lm(formula = dw.repro ~ max.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt10 ph
## 22.23598 -0.02035 -2.64664
summary (lm11)
##
## Call:
## lm(formula = dw.repro ~ max.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.6761 -0.6868 -0.3264 0.5458 2.8415
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 22.23598 10.72178 2.074 0.0447 *
## max.daily.sal.lt10 -0.02035 0.02140 -0.951 0.3476
## ph -2.64664 1.36987 -1.932 0.0606 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.081 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1514, Adjusted R-squared: 0.1079
## F-statistic: 3.479 on 2 and 39 DF, p-value: 0.04072
anova (lm11)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt10 1 3.771 3.7712 3.2249 0.08028 .
## ph 1 4.365 4.3651 3.7327 0.06064 .
## Residuals 39 45.607 1.1694
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm11)
Effect of salinity and pH on dry weight of reproductive tissue: number of days with a daily maximum salinity less than 15
lm12 <- lm(dw.repro ~ max.daily.sal.lt15 +ph, data =all)
lm12
##
## Call:
## lm(formula = dw.repro ~ max.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt15 ph
## 20.69581 -0.02547 -2.44003
summary (lm12)
##
## Call:
## lm(formula = dw.repro ~ max.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.6453 -0.6547 -0.3332 0.5561 2.7959
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 20.69581 10.78403 1.919 0.0623 .
## max.daily.sal.lt15 -0.02547 0.02057 -1.239 0.2229
## ph -2.44003 1.37960 -1.769 0.0848 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.073 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1646, Adjusted R-squared: 0.1217
## F-statistic: 3.842 on 2 and 39 DF, p-value: 0.03
anova (lm12)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt15 1 5.244 5.2440 4.5551 0.03916 *
## ph 1 3.601 3.6012 3.1281 0.08477 .
## Residuals 39 44.898 1.1512
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm12)
Effect of salinity and pH on dry weight of reproductive tissue: number of days with a daily salinity range greater than 10
lm13 <- lm(dw.repro ~ daily.sal.range.gt10 +ph, data =all)
lm13
##
## Call:
## lm(formula = dw.repro ~ daily.sal.range.gt10 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt10 ph
## 24.00909 -0.01151 -2.88429
summary (lm13)
##
## Call:
## lm(formula = dw.repro ~ daily.sal.range.gt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5821 -0.7682 -0.3934 0.5444 2.9239
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 24.00909 10.65862 2.253 0.0300 *
## daily.sal.range.gt10 -0.01151 0.02134 -0.539 0.5928
## ph -2.88429 1.36049 -2.120 0.0404 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.09 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1381, Adjusted R-squared: 0.09395
## F-statistic: 3.126 on 2 and 39 DF, p-value: 0.05507
anova (lm13)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt10 1 2.087 2.0865 1.7568 0.19273
## ph 1 5.338 5.3380 4.4946 0.04042 *
## Residuals 39 46.319 1.1877
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm13)
Effect of salinity and pH on dry weight of reproductive tissue: number of days with a daily salinity range greater than 5
lm14 <- lm(dw.repro ~ daily.sal.range.gt5 +ph, data =all)
lm14
##
## Call:
## lm(formula = dw.repro ~ daily.sal.range.gt5 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt5 ph
## 25.912448 -0.004355 -3.132990
summary (lm14)
##
## Call:
## lm(formula = dw.repro ~ daily.sal.range.gt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5453 -0.7432 -0.3963 0.6046 3.0246
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 25.912448 10.153682 2.552 0.0147 *
## daily.sal.range.gt5 -0.004355 0.019442 -0.224 0.8239
## ph -3.132990 1.285995 -2.436 0.0195 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.093 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1328, Adjusted R-squared: 0.08837
## F-statistic: 2.987 on 2 and 39 DF, p-value: 0.06208
anova (lm14)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt5 1 0.047 0.0467 0.0391 0.84430
## ph 1 7.092 7.0925 5.9353 0.01951 *
## Residuals 39 46.604 1.1950
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm14)
Different pH terms
Data for pH: ph (median pH), daily.min.ph (daily minimum pH), daily.max.ph (daily maximum pH), daily.ph.range (daily pH range), daily.med.ph (daily median pH), min.daily.ph.lt7/8 (number of days with a daily minimum pH less than 7 and 8), max.daily.ph.lt7 (number of days with a daily maximum pH less than 7), and daily.ph.range.gt0.5 (number of days with a daily pH range greater than 0.5)
Effect salinity and pH on dry weight of reproductive tissue: daily minimum ph
lm3 <- lm(dw.repro ~ daily.min.ph + salinity, data =all)
lm3
##
## Call:
## lm(formula = dw.repro ~ daily.min.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.min.ph salinity
## 29.688242 -3.687621 0.009348
summary (lm3)
##
## Call:
## lm(formula = dw.repro ~ daily.min.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.3003 -0.7530 -0.3519 0.5790 2.8895
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 29.688242 14.050000 2.113 0.0410 *
## daily.min.ph -3.687621 1.785267 -2.066 0.0456 *
## salinity 0.009348 0.023959 0.390 0.6985
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.106 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1117, Adjusted R-squared: 0.06613
## F-statistic: 2.452 on 2 and 39 DF, p-value: 0.09933
anova (lm3)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.ph 1 5.816 5.8158 4.7510 0.03538 *
## salinity 1 0.186 0.1864 0.1522 0.69853
## Residuals 39 47.741 1.2241
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect salinity and pH on dry weight of reproductive tissue: daily maximum ph
lm4 <- lm(dw.repro ~ daily.max.ph + salinity, data =all)
lm4
##
## Call:
## lm(formula = dw.repro ~ daily.max.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.max.ph salinity
## 10.14322 -1.17620 0.01599
summary (lm4)
##
## Call:
## lm(formula = dw.repro ~ daily.max.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.1938 -0.7965 -0.3078 0.5169 3.4933
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 10.14322 7.96870 1.273 0.211
## daily.max.ph -1.17620 0.98884 -1.189 0.241
## salinity 0.01599 0.02445 0.654 0.517
##
## Residual standard error: 1.145 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.049, Adjusted R-squared: 0.0002317
## F-statistic: 1.005 on 2 and 39 DF, p-value: 0.3754
anova (lm4)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.ph 1 2.073 2.0729 1.5817 0.2160
## salinity 1 0.561 0.5606 0.4278 0.5169
## Residuals 39 51.110 1.3105
plot (lm4)
Effect of salinity and pH on dry weight of reproductive tissue: daily ph range
lm5 <- lm(dw.repro ~ daily.ph.range + salinity, data =all)
lm5
##
## Call:
## lm(formula = dw.repro ~ daily.ph.range + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range salinity
## 0.68265 0.06812 0.01812
summary (lm5)
##
## Call:
## lm(formula = dw.repro ~ daily.ph.range + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.1043 -0.7328 -0.4055 0.3517 3.7371
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.68265 0.60691 1.125 0.268
## daily.ph.range 0.06812 0.16005 0.426 0.673
## salinity 0.01812 0.02476 0.732 0.469
##
## Residual standard error: 1.163 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.01906, Adjusted R-squared: -0.03125
## F-statistic: 0.3788 on 2 and 39 DF, p-value: 0.6872
anova (lm5)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range 1 0.300 0.30048 0.2223 0.6399
## salinity 1 0.724 0.72366 0.5353 0.4687
## Residuals 39 52.719 1.35177
plot (lm5)
## Warning in sqrt(crit * p * (1 - hh)/hh): NaNs produced
## Warning in sqrt(crit * p * (1 - hh)/hh): NaNs produced
Effect salinity and pH on dry weight of reproductive tissue: daily median ph
lm6 <- lm(dw.repro ~ daily.med.ph + salinity, data =all)
lm6
##
## Call:
## lm(formula = dw.repro ~ daily.med.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.med.ph salinity
## 17.79898 -2.15310 0.01429
summary (lm6)
##
## Call:
## lm(formula = dw.repro ~ daily.med.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.2422 -0.7931 -0.3330 0.5802 3.2650
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 17.79898 10.25818 1.735 0.0906 .
## daily.med.ph -2.15310 1.28893 -1.670 0.1028
## salinity 0.01429 0.02408 0.593 0.5565
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.126 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.0803, Adjusted R-squared: 0.03314
## F-statistic: 1.703 on 2 and 39 DF, p-value: 0.1955
anova (lm6)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.ph 1 3.870 3.8698 3.0534 0.08844 .
## salinity 1 0.446 0.4460 0.3519 0.55648
## Residuals 39 49.427 1.2674
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect salinity and pH on dry weight of reproductive tissue: number of days with a daily minimun ph less than 7
lm7 <- lm(dw.repro ~ min.daily.ph.lt7 + salinity, data =all)
lm7
##
## Call:
## lm(formula = dw.repro ~ min.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt7 salinity
## 0.83663 -0.03840 0.02817
summary (lm7)
##
## Call:
## lm(formula = dw.repro ~ min.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.3545 -0.7924 -0.3262 0.4901 3.4995
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.83663 0.59272 1.412 0.1660
## min.daily.ph.lt7 -0.03840 0.02254 -1.704 0.0964 .
## salinity 0.02817 0.02453 1.148 0.2579
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.124 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.08275, Adjusted R-squared: 0.03572
## F-statistic: 1.759 on 2 and 39 DF, p-value: 0.1856
anova (lm7)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt7 1 2.781 2.7809 2.2001 0.1460
## salinity 1 1.667 1.6665 1.3185 0.2579
## Residuals 39 49.296 1.2640
plot (lm7)
Effect salinity and pH on dry weight of reproductive tissue: number of days with a daily minimun ph less than 8
lm7 <- lm(dw.repro ~ min.daily.ph.lt8 + salinity, data =all)
lm7
##
## Call:
## lm(formula = dw.repro ~ min.daily.ph.lt8 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt8 salinity
## 0.83957 -0.00619 0.01909
summary (lm7)
##
## Call:
## lm(formula = dw.repro ~ min.daily.ph.lt8 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.0914 -0.7498 -0.4160 0.4656 3.7789
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.83957 0.66700 1.259 0.216
## min.daily.ph.lt8 -0.00619 0.01165 -0.531 0.598
## salinity 0.01909 0.02469 0.773 0.444
##
## Residual standard error: 1.161 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.02158, Adjusted R-squared: -0.02859
## F-statistic: 0.4301 on 2 and 39 DF, p-value: 0.6535
anova (lm7)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt8 1 0.354 0.35431 0.2628 0.6111
## salinity 1 0.806 0.80556 0.5975 0.4442
## Residuals 39 52.583 1.34829
plot (lm7)
Effect salinity and pH on dry weight of reproductive tissue: number of days with a daily maximum ph less than 7
lm10 <- lm(dw.repro ~ max.daily.ph.lt7 + salinity, data =all)
lm10
##
## Call:
## lm(formula = dw.repro ~ max.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) max.daily.ph.lt7 salinity
## 0.83663 -0.03840 0.02817
summary (lm10)
##
## Call:
## lm(formula = dw.repro ~ max.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.3545 -0.7924 -0.3262 0.4901 3.4995
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.83663 0.59272 1.412 0.1660
## max.daily.ph.lt7 -0.03840 0.02254 -1.704 0.0964 .
## salinity 0.02817 0.02453 1.148 0.2579
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.124 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.08275, Adjusted R-squared: 0.03572
## F-statistic: 1.759 on 2 and 39 DF, p-value: 0.1856
anova (lm10)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.ph.lt7 1 2.781 2.7809 2.2001 0.1460
## salinity 1 1.667 1.6665 1.3185 0.2579
## Residuals 39 49.296 1.2640
plot (lm10)
Effect salinity and pH on dry weight of reproductive tissue: number of days with a daily ph range greater than 0.5
lm13 <- lm(dw.repro ~ daily.ph.range.gt0.5 +salinity, data =all)
lm13
##
## Call:
## lm(formula = dw.repro ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range.gt0.5 salinity
## 0.86255 -0.03930 0.02906
summary (lm13)
##
## Call:
## lm(formula = dw.repro ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.4004 -0.8123 -0.3435 0.4647 3.4624
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.86255 0.59010 1.462 0.1518
## daily.ph.range.gt0.5 -0.03930 0.02119 -1.854 0.0713 .
## salinity 0.02906 0.02439 1.192 0.2406
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.117 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.09434, Adjusted R-squared: 0.0479
## F-statistic: 2.031 on 2 and 39 DF, p-value: 0.1448
anova (lm13)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range.gt0.5 1 3.298 3.2984 2.6429 0.1121
## salinity 1 1.772 1.7719 1.4198 0.2406
## Residuals 39 48.673 1.2480
plot (lm13)
####Q2.3 Effects of salinity and pH on number of reproductive apices#### Different salinity terms first
Effect of pH and salinity on number of reproductive apices
lm1 <- lm(apices.repro ~ salinity + ph + salinity:ph, data =all)
lm1
##
## Call:
## lm(formula = apices.repro ~ salinity + ph + salinity:ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph salinity:ph
## 536.774 -9.594 -64.948 1.236
summary (lm1)
##
## Call:
## lm(formula = apices.repro ~ salinity + ph + salinity:ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -27.428 -18.876 -7.324 13.701 63.708
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 536.774 1068.320 0.502 0.618
## salinity -9.594 47.809 -0.201 0.842
## ph -64.948 135.177 -0.480 0.634
## salinity:ph 1.236 6.054 0.204 0.839
##
## Residual standard error: 25.38 on 38 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.04587, Adjusted R-squared: -0.02945
## F-statistic: 0.609 on 3 and 38 DF, p-value: 0.6133
anova (lm1)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 112.2 112.15 0.1742 0.6788
## ph 1 1037.5 1037.52 1.6111 0.2121
## salinity:ph 1 26.8 26.82 0.0416 0.8394
## Residuals 38 24470.6 643.96
plot (lm1)
Effect of pH and salinity on number of reproductive apices, interaction term removed
lm2 <- lm(apices.repro ~ salinity + ph, data =all)
lm2
##
## Call:
## lm(formula = apices.repro ~ salinity + ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph
## 324.2267 0.1628 -38.0475
summary (lm2)
##
## Call:
## lm(formula = apices.repro ~ salinity + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -26.260 -19.012 -8.198 13.238 65.841
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 324.2267 235.0413 1.379 0.176
## salinity 0.1628 0.5350 0.304 0.763
## ph -38.0475 29.6044 -1.285 0.206
##
## Residual standard error: 25.06 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.04483, Adjusted R-squared: -0.004157
## F-statistic: 0.9151 on 2 and 39 DF, p-value: 0.4089
anova (lm2)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 112.2 112.15 0.1786 0.6749
## ph 1 1037.5 1037.52 1.6517 0.2063
## Residuals 39 24497.5 628.14
plot (lm2)
Effect and salinity and pH on number of reproductive apices: daily minimum salinity
lm3 <- lm(apices.repro ~ daily.min.sal + ph, data =all)
lm3
##
## Call:
## lm(formula = apices.repro ~ daily.min.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.min.sal ph
## 328.7130 0.1311 -38.4845
summary (lm3)
##
## Call:
## lm(formula = apices.repro ~ daily.min.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -26.453 -19.240 -8.257 13.665 65.502
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 328.7130 233.6370 1.407 0.167
## daily.min.sal 0.1311 0.4830 0.271 0.788
## ph -38.4845 29.5228 -1.304 0.200
##
## Residual standard error: 25.07 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.04436, Adjusted R-squared: -0.004643
## F-statistic: 0.9053 on 2 and 39 DF, p-value: 0.4128
anova (lm3)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.sal 1 69.9 69.92 0.1113 0.7405
## ph 1 1067.9 1067.88 1.6992 0.2000
## Residuals 39 24509.3 628.44
plot (lm3)
Effect and salinity and pH on number of reproductive apices: daily maximum salinity
lm4 <- lm(apices.repro ~ daily.max.sal + ph, data =all)
lm4
##
## Call:
## lm(formula = apices.repro ~ daily.max.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.max.sal ph
## 317.478 0.249 -37.539
summary (lm4)
##
## Call:
## lm(formula = apices.repro ~ daily.max.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -25.872 -19.571 -8.567 12.729 66.342
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 317.4783 236.7979 1.341 0.188
## daily.max.sal 0.2490 0.6604 0.377 0.708
## ph -37.5393 29.6725 -1.265 0.213
##
## Residual standard error: 25.05 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.04604, Adjusted R-squared: -0.002884
## F-statistic: 0.941 on 2 and 39 DF, p-value: 0.3989
anova (lm4)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.sal 1 176.6 176.64 0.2816 0.5987
## ph 1 1004.1 1004.08 1.6005 0.2133
## Residuals 39 24466.4 627.34
plot (lm4)
Effect and salinity and pH on number of reproductive apices: daily salinity range
lm5 <- lm(apices.repro ~ daily.sal.range + ph, data =all)
lm5
##
## Call:
## lm(formula = apices.repro ~ daily.sal.range + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range ph
## 333.4372 0.0313 -38.7511
summary (lm5)
##
## Call:
## lm(formula = apices.repro ~ daily.sal.range + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -27.073 -20.422 -8.508 13.683 64.025
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 333.4372 234.6582 1.421 0.163
## daily.sal.range 0.0313 0.8595 0.036 0.971
## ph -38.7511 29.6803 -1.306 0.199
##
## Residual standard error: 25.09 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.04259, Adjusted R-squared: -0.006506
## F-statistic: 0.8675 on 2 and 39 DF, p-value: 0.428
anova (lm5)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range 1 19.1 19.10 0.0303 0.8626
## ph 1 1073.3 1073.25 1.7046 0.1993
## Residuals 39 24554.8 629.61
plot (lm5)
Effect and salinity and pH on number of reproductive apices: daily median salinity
lm6 <- lm(apices.repro ~ daily.med.sal + ph, data =all)
lm6
##
## Call:
## lm(formula = apices.repro ~ daily.med.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.med.sal ph
## 321.9690 0.1983 -37.8630
summary (lm6)
##
## Call:
## lm(formula = apices.repro ~ daily.med.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -26.116 -19.297 -8.157 13.240 66.229
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 321.9690 234.9126 1.371 0.178
## daily.med.sal 0.1983 0.5346 0.371 0.713
## ph -37.8630 29.5889 -1.280 0.208
##
## Residual standard error: 25.05 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.04593, Adjusted R-squared: -0.003002
## F-statistic: 0.9386 on 2 and 39 DF, p-value: 0.3998
anova (lm6)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.sal 1 150.5 150.47 0.2398 0.6271
## ph 1 1027.4 1027.38 1.6375 0.2082
## Residuals 39 24469.3 627.42
plot (lm6)
Effect of salinity and pH on number of reproductive apices: number of days with a daily minimun salinity less than 5
lm7 <- lm(apices.repro ~ min.daily.sal.lt5 + ph, data =all)
lm7
##
## Call:
## lm(formula = apices.repro ~ min.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt5 ph
## 264.1771 -0.5053 -29.2806
summary (lm7)
##
## Call:
## lm(formula = apices.repro ~ min.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -30.01 -16.65 -9.00 11.95 61.09
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 264.1771 240.1473 1.100 0.278
## min.daily.sal.lt5 -0.5053 0.4991 -1.012 0.318
## ph -29.2806 30.6364 -0.956 0.345
##
## Residual standard error: 24.77 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.06707, Adjusted R-squared: 0.01923
## F-statistic: 1.402 on 2 and 39 DF, p-value: 0.2582
anova (lm7)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt5 1 1159.9 1159.86 1.8905 0.1770
## ph 1 560.4 560.41 0.9134 0.3451
## Residuals 39 23926.9 613.51
plot (lm7)
Effect of salinity and pH on number of reproductive apices: number of days with a daily minimun salinity less than 10
lm8 <- lm(apices.repro ~ min.daily.sal.lt10 + ph, data =all)
lm8
##
## Call:
## lm(formula = apices.repro ~ min.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt10 ph
## 296.5024 -0.2318 -33.6715
summary (lm8)
##
## Call:
## lm(formula = apices.repro ~ min.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -28.337 -18.934 -9.401 13.331 64.618
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 296.5024 245.1303 1.210 0.234
## min.daily.sal.lt10 -0.2318 0.4796 -0.483 0.632
## ph -33.6715 31.3292 -1.075 0.289
##
## Residual standard error: 25.02 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.04826, Adjusted R-squared: -0.000547
## F-statistic: 0.9888 on 2 and 39 DF, p-value: 0.3812
anova (lm8)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt10 1 514.8 514.77 0.8225 0.3700
## ph 1 723.0 722.97 1.1551 0.2891
## Residuals 39 24409.4 625.88
plot (lm8)
Effect of salinity and pH on number of reproductive apices: number of days with a daily minimun salinity less than 15
lm9 <- lm(apices.repro ~ min.daily.sal.lt15 +ph , data =all)
lm9
##
## Call:
## lm(formula = apices.repro ~ min.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt15 ph
## 334.281419 -0.002712 -38.833342
summary (lm9)
##
## Call:
## lm(formula = apices.repro ~ min.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -27.013 -20.390 -8.636 13.788 64.122
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 334.281419 235.277433 1.421 0.163
## min.daily.sal.lt15 -0.002712 0.442323 -0.006 0.995
## ph -38.833342 29.946848 -1.297 0.202
##
## Residual standard error: 25.09 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.04256, Adjusted R-squared: -0.006539
## F-statistic: 0.8668 on 2 and 39 DF, p-value: 0.4282
anova (lm9)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt15 1 32.8 32.80 0.0521 0.8207
## ph 1 1058.7 1058.75 1.6815 0.2023
## Residuals 39 24555.6 629.63
plot (lm9)
Effect of salinity and pH on number of reproductive apices: number of days with a daily maximum salinity less than 5
lm10 <- lm(apices.repro ~ max.daily.sal.lt5 +ph, data =all)
lm10
##
## Call:
## lm(formula = apices.repro ~ max.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt5 ph
## 280.42 -0.31 -31.59
summary (lm10)
##
## Call:
## lm(formula = apices.repro ~ max.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -28.66 -19.17 -8.49 13.30 62.44
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 280.4213 246.6738 1.137 0.263
## max.daily.sal.lt5 -0.3100 0.4856 -0.638 0.527
## ph -31.5908 31.4975 -1.003 0.322
##
## Residual standard error: 24.96 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.05246, Adjusted R-squared: 0.003868
## F-statistic: 1.08 on 2 and 39 DF, p-value: 0.3497
anova (lm10)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt5 1 718.6 718.63 1.1533 0.2895
## ph 1 626.8 626.82 1.0059 0.3221
## Residuals 39 24301.7 623.12
plot (lm10)
Effect of salinity and pH on number of reproductive apices: number of days with a daily maximum salinity less than 10
lm11 <- lm(apices.repro ~ max.daily.sal.lt10 +ph, data =all)
lm11
##
## Call:
## lm(formula = apices.repro ~ max.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt10 ph
## 251.4388 -0.4713 -27.6726
summary (lm11)
##
## Call:
## lm(formula = apices.repro ~ max.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -29.688 -17.505 -7.964 12.006 61.412
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 251.4388 245.8979 1.023 0.313
## max.daily.sal.lt10 -0.4713 0.4909 -0.960 0.343
## ph -27.6726 31.4173 -0.881 0.384
##
## Residual standard error: 24.8 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.06467, Adjusted R-squared: 0.0167
## F-statistic: 1.348 on 2 and 39 DF, p-value: 0.2716
anova (lm11)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt10 1 1181.3 1181.29 1.9205 0.1737
## ph 1 477.2 477.21 0.7758 0.3838
## Residuals 39 23988.6 615.09
plot (lm11)
Effect of salinity and pH on number of reproductive apices: number of days with a daily maximum salinity less than 15
lm12 <- lm(apices.repro ~ max.daily.sal.lt15 +ph, data =all)
lm12
##
## Call:
## lm(formula = apices.repro ~ max.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt15 ph
## 247.2872 -0.4333 -27.1293
summary (lm12)
##
## Call:
## lm(formula = apices.repro ~ max.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -29.758 -16.622 -8.571 11.657 61.342
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 247.2872 249.5611 0.991 0.328
## max.daily.sal.lt15 -0.4333 0.4759 -0.910 0.368
## ph -27.1293 31.9263 -0.850 0.401
##
## Residual standard error: 24.83 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.06248, Adjusted R-squared: 0.01441
## F-statistic: 1.3 on 2 and 39 DF, p-value: 0.2842
anova (lm12)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt15 1 1157.4 1157.37 1.8772 0.1785
## ph 1 445.2 445.18 0.7221 0.4007
## Residuals 39 24044.6 616.53
plot (lm12)
Effect of salinity and pH on number of reproductive apices: number of days with a daily salinity range greater than 10
lm13 <- lm(apices.repro ~ daily.sal.range.gt10 +ph, data =all)
lm13
##
## Call:
## lm(formula = apices.repro ~ daily.sal.range.gt10 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt10 ph
## 293.1616 -0.2623 -33.2656
summary (lm13)
##
## Call:
## lm(formula = apices.repro ~ daily.sal.range.gt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -28.292 -19.143 -8.844 13.604 63.333
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 293.1616 244.5153 1.199 0.238
## daily.sal.range.gt10 -0.2623 0.4895 -0.536 0.595
## ph -33.2656 31.2104 -1.066 0.293
##
## Residual standard error: 25 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.04956, Adjusted R-squared: 0.0008152
## F-statistic: 1.017 on 2 and 39 DF, p-value: 0.3712
anova (lm13)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt10 1 560.9 560.91 0.8974 0.3493
## ph 1 710.1 710.06 1.1360 0.2930
## Residuals 39 24376.2 625.03
plot (lm13)
Effect of salinity and pH on number of reproductive apices: number of days with a daily salinity range greater than 5
lm14 <- lm(apices.repro ~ daily.sal.range.gt5 +ph, data =all)
lm14
##
## Call:
## lm(formula = apices.repro ~ daily.sal.range.gt5 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt5 ph
## 333.06990 0.06812 -38.81570
summary (lm14)
##
## Call:
## lm(formula = apices.repro ~ daily.sal.range.gt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -28.714 -20.005 -8.241 13.656 62.999
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 333.06990 233.00108 1.429 0.161
## daily.sal.range.gt5 0.06812 0.44614 0.153 0.879
## ph -38.81570 29.51030 -1.315 0.196
##
## Residual standard error: 25.08 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.04313, Adjusted R-squared: -0.005939
## F-statistic: 0.879 on 2 and 39 DF, p-value: 0.4233
anova (lm14)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt5 1 17.5 17.52 0.0279 0.8683
## ph 1 1088.7 1088.66 1.7301 0.1961
## Residuals 39 24540.9 629.25
plot (lm14)
Different pH terms
Data for pH: ph (median pH), daily.min.ph (daily minimum pH), daily.max.ph (daily maximum pH), daily.ph.range (daily pH range), daily.med.ph (daily median pH), min.daily.ph.lt7/8 (number of days with a daily minimum pH less than 7 and 8), max.daily.ph.lt7 (number of days with a daily maximum pH less than 7), and daily.ph.range.gt0.5 (number of days with a daily pH range greater than 0.5)
Effect salinity and pH on number of reproductive apices: daily minimum ph
lm3 <- lm(apices.repro ~ daily.min.ph + salinity, data =all)
lm3
##
## Call:
## lm(formula = apices.repro ~ daily.min.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.min.ph salinity
## 387.4792 -46.4001 0.1066
summary (lm3)
##
## Call:
## lm(formula = apices.repro ~ daily.min.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -28.734 -17.628 -7.628 14.891 63.022
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 387.4792 319.6321 1.212 0.233
## daily.min.ph -46.4001 40.6141 -1.142 0.260
## salinity 0.1066 0.5451 0.196 0.846
##
## Residual standard error: 25.17 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.03661, Adjusted R-squared: -0.01279
## F-statistic: 0.7411 on 2 and 39 DF, p-value: 0.4832
anova (lm3)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.ph 1 914.8 914.82 1.4440 0.2367
## salinity 1 24.2 24.25 0.0383 0.8459
## Residuals 39 24708.1 633.54
plot (lm3)
Effect salinity and pH on number of reproductive apices: daily maximum ph
lm4 <- lm(apices.repro ~ daily.max.ph + salinity, data =all)
lm4
##
## Call:
## lm(formula = apices.repro ~ daily.max.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.max.ph salinity
## 80.973 -7.262 0.208
summary (lm4)
##
## Call:
## lm(formula = apices.repro ~ daily.max.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -25.84 -18.73 -8.16 11.98 72.16
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 80.9734 177.8696 0.455 0.651
## daily.max.ph -7.2615 22.0719 -0.329 0.744
## salinity 0.2080 0.5457 0.381 0.705
##
## Residual standard error: 25.55 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.007129, Adjusted R-squared: -0.04379
## F-statistic: 0.14 on 2 and 39 DF, p-value: 0.8698
anova (lm4)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.ph 1 88.0 87.97 0.1347 0.7156
## salinity 1 94.9 94.85 0.1453 0.7052
## Residuals 39 25464.3 652.93
plot (lm4)
Effect of salinity and pH on number of reproductive apices: daily ph range
lm5 <- lm(apices.repro ~ daily.ph.range + salinity, data =all)
lm5
##
## Call:
## lm(formula = apices.repro ~ daily.ph.range + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range salinity
## 22.5527 0.5318 0.2201
summary (lm5)
##
## Call:
## lm(formula = apices.repro ~ daily.ph.range + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -25.654 -17.883 -8.132 8.569 73.670
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 22.5527 13.3531 1.689 0.0992 .
## daily.ph.range 0.5318 3.5214 0.151 0.8807
## salinity 0.2201 0.5448 0.404 0.6885
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 25.58 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.004955, Adjusted R-squared: -0.04607
## F-statistic: 0.0971 on 2 and 39 DF, p-value: 0.9077
anova (lm5)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range 1 20.3 20.31 0.0310 0.8611
## salinity 1 106.8 106.77 0.1632 0.6885
## Residuals 39 25520.0 654.36
plot (lm5)
## Warning in sqrt(crit * p * (1 - hh)/hh): NaNs produced
## Warning in sqrt(crit * p * (1 - hh)/hh): NaNs produced
Effect salinity and pH on number of reproductive apices: daily median ph
lm6 <- lm(apices.repro ~ daily.med.ph + salinity, data =all)
lm6
##
## Call:
## lm(formula = apices.repro ~ daily.med.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.med.ph salinity
## 185.4122 -20.4882 0.1825
summary (lm6)
##
## Call:
## lm(formula = apices.repro ~ daily.med.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -25.483 -18.962 -7.315 12.891 69.184
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 185.4122 231.6936 0.800 0.428
## daily.med.ph -20.4882 29.1120 -0.704 0.486
## salinity 0.1825 0.5439 0.336 0.739
##
## Residual standard error: 25.43 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.01686, Adjusted R-squared: -0.03356
## F-statistic: 0.3344 on 2 and 39 DF, p-value: 0.7178
anova (lm6)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.ph 1 359.6 359.60 0.5562 0.4603
## salinity 1 72.8 72.78 0.1126 0.7390
## Residuals 39 25214.7 646.53
plot (lm6)
Effect salinity and pH on number of reproductive apices: number of days with a daily minimun ph less than 7
lm7 <- lm(apices.repro ~ min.daily.ph.lt7 + salinity, data =all)
lm7
##
## Call:
## lm(formula = apices.repro ~ min.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt7 salinity
## 25.2914 -0.7057 0.3979
summary (lm7)
##
## Call:
## lm(formula = apices.repro ~ min.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -31.056 -20.233 -4.932 11.647 69.343
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 25.2914 13.1587 1.922 0.0619 .
## min.daily.ph.lt7 -0.7057 0.5004 -1.410 0.1664
## salinity 0.3979 0.5446 0.731 0.4694
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 24.96 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.05268, Adjusted R-squared: 0.004102
## F-statistic: 1.084 on 2 and 39 DF, p-value: 0.3481
anova (lm7)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt7 1 1018.6 1018.59 1.6350 0.2086
## salinity 1 332.6 332.56 0.5338 0.4694
## Residuals 39 24296.0 622.97
plot (lm7)
Effect salinity and pH on number of reproductive apices: number of days with a daily minimun ph less than 8
lm7 <- lm(apices.repro ~ min.daily.ph.lt8 + salinity, data =all)
lm7
##
## Call:
## lm(formula = apices.repro ~ min.daily.ph.lt8 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt8 salinity
## 21.65043 0.04047 0.22305
summary (lm7)
##
## Call:
## lm(formula = apices.repro ~ min.daily.ph.lt8 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -26.678 -18.239 -8.551 8.949 73.343
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 21.65043 14.69376 1.473 0.149
## min.daily.ph.lt8 0.04047 0.25667 0.158 0.876
## salinity 0.22305 0.54396 0.410 0.684
##
## Residual standard error: 25.58 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.005007, Adjusted R-squared: -0.04602
## F-statistic: 0.09813 on 2 and 39 DF, p-value: 0.9067
anova (lm7)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt8 1 18.4 18.41 0.0281 0.8677
## salinity 1 110.0 110.02 0.1681 0.6840
## Residuals 39 25518.7 654.33
plot (lm7)
Effect salinity and pH on number of reproductive apices: number of days with a daily maximum ph less than 7
lm10 <- lm(apices.repro ~ max.daily.ph.lt7 + salinity, data =all)
lm10
##
## Call:
## lm(formula = apices.repro ~ max.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) max.daily.ph.lt7 salinity
## 25.2914 -0.7057 0.3979
summary (lm10)
##
## Call:
## lm(formula = apices.repro ~ max.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -31.056 -20.233 -4.932 11.647 69.343
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 25.2914 13.1587 1.922 0.0619 .
## max.daily.ph.lt7 -0.7057 0.5004 -1.410 0.1664
## salinity 0.3979 0.5446 0.731 0.4694
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 24.96 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.05268, Adjusted R-squared: 0.004102
## F-statistic: 1.084 on 2 and 39 DF, p-value: 0.3481
anova (lm10)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.ph.lt7 1 1018.6 1018.59 1.6350 0.2086
## salinity 1 332.6 332.56 0.5338 0.4694
## Residuals 39 24296.0 622.97
plot (lm10)
Effect salinity and pH on number of reproductive apices: number of days with a daily ph range greater than 0.5
lm13 <- lm(apices.repro ~ daily.ph.range.gt0.5 +salinity, data =all)
lm13
##
## Call:
## lm(formula = apices.repro ~ daily.ph.range.gt0.5 + salinity,
## data = all)
##
## Coefficients:
## (Intercept) daily.ph.range.gt0.5 salinity
## 25.5786 -0.6788 0.4030
summary (lm13)
##
## Call:
## lm(formula = apices.repro ~ daily.ph.range.gt0.5 + salinity,
## data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -31.489 -20.325 -5.731 13.417 68.960
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 25.5786 13.1730 1.942 0.0594 .
## daily.ph.range.gt0.5 -0.6788 0.4731 -1.435 0.1593
## salinity 0.4030 0.5445 0.740 0.4637
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 24.94 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.05429, Adjusted R-squared: 0.005794
## F-statistic: 1.119 on 2 and 39 DF, p-value: 0.3367
anova (lm13)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range.gt0.5 1 1051.8 1051.75 1.6911 0.2011
## salinity 1 340.7 340.68 0.5478 0.4637
## Residuals 39 24254.7 621.92
plot (lm13)
####Q2.4 Effects of salinity and pH on percent of reproductive apices#### Different salinity terms first
Effect of pH and salinity on percent reproductive apices
lm1 <- lm(perc.ra ~ salinity + ph + salinity:ph, data =all)
lm1
##
## Call:
## lm(formula = perc.ra ~ salinity + ph + salinity:ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph salinity:ph
## -759.134 56.270 98.353 -7.089
summary (lm1)
##
## Call:
## lm(formula = perc.ra ~ salinity + ph + salinity:ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -22.814 -11.201 -4.418 8.705 38.225
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -759.134 677.707 -1.120 0.2697
## salinity 56.270 30.329 1.855 0.0713 .
## ph 98.353 85.752 1.147 0.2586
## salinity:ph -7.089 3.840 -1.846 0.0727 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.1 on 38 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2597, Adjusted R-squared: 0.2013
## F-statistic: 4.444 on 3 and 38 DF, p-value: 0.009
anova (lm1)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 325.0 325.03 1.2543 0.269771
## ph 1 2246.9 2246.90 8.6704 0.005493 **
## salinity:ph 1 883.0 882.95 3.4072 0.072715 .
## Residuals 38 9847.5 259.14
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm1)
Effect of pH and salinity on percent reproductive apices, interaction term removed
lm2 <- lm(perc.ra ~ salinity + ph, data =all)
lm2
##
## Call:
## lm(formula = perc.ra ~ salinity + ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph
## 460.3810 0.2915 -55.9912
summary (lm2)
##
## Call:
## lm(formula = perc.ra ~ salinity + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -23.526 -13.888 -0.801 11.568 36.644
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 460.3810 155.5581 2.960 0.00522 **
## salinity 0.2915 0.3541 0.823 0.41536
## ph -55.9912 19.5932 -2.858 0.00681 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.59 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1933, Adjusted R-squared: 0.152
## F-statistic: 4.674 on 2 and 39 DF, p-value: 0.01515
anova (lm2)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 325.0 325.03 1.1813 0.283756
## ph 1 2246.9 2246.90 8.1664 0.006813 **
## Residuals 39 10730.5 275.14
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm2)
Effect and salinity and pH on percent reproductive apices: daily minimum salinity
lm3 <- lm(perc.ra ~ daily.min.sal + ph, data =all)
lm3
##
## Call:
## lm(formula = perc.ra ~ daily.min.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.min.sal ph
## 476.03479 0.06173 -57.27507
summary (lm3)
##
## Call:
## lm(formula = perc.ra ~ daily.min.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -26.212 -12.607 -1.941 12.969 36.433
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 476.03479 155.85548 3.054 0.00405 **
## daily.min.sal 0.06173 0.32219 0.192 0.84906
## ph -57.27507 19.69417 -2.908 0.00597 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.72 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1801, Adjusted R-squared: 0.1381
## F-statistic: 4.283 on 2 and 39 DF, p-value: 0.02081
anova (lm3)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.sal 1 30.4 30.43 0.1088 0.743281
## ph 1 2365.3 2365.29 8.4578 0.005971 **
## Residuals 39 10906.7 279.66
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect and salinity and pH on percent reproductive apices: daily maximum salinity
lm4 <- lm(perc.ra ~ daily.max.sal + ph, data =all)
lm4
##
## Call:
## lm(formula = perc.ra ~ daily.max.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.max.sal ph
## 425.8758 0.7742 -53.3346
summary (lm4)
##
## Call:
## lm(formula = perc.ra ~ daily.max.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -23.080 -12.467 -1.497 9.573 33.887
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 425.8758 151.8023 2.805 0.00780 **
## daily.max.sal 0.7742 0.4233 1.829 0.07509 .
## ph -53.3346 19.0219 -2.804 0.00783 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.06 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2441, Adjusted R-squared: 0.2054
## F-statistic: 6.298 on 2 and 39 DF, p-value: 0.004262
anova (lm4)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.sal 1 1220.8 1220.83 4.7353 0.03567 *
## ph 1 2026.8 2026.82 7.8615 0.00783 **
## Residuals 39 10054.7 257.81
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm4)
Effect and salinity and pH on percent reproductive apices: daily salinity range
lm5 <- lm(perc.ra ~ daily.sal.range + ph, data =all)
lm5
##
## Call:
## lm(formula = perc.ra ~ daily.sal.range + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range ph
## 442.653 1.077 -53.558
summary (lm5)
##
## Call:
## lm(formula = perc.ra ~ daily.sal.range + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -29.101 -13.996 -2.112 11.653 29.149
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 442.6525 149.2169 2.967 0.00512 **
## daily.sal.range 1.0767 0.5465 1.970 0.05597 .
## ph -53.5578 18.8734 -2.838 0.00717 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 15.96 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2536, Adjusted R-squared: 0.2153
## F-statistic: 6.625 on 2 and 39 DF, p-value: 0.003334
anova (lm5)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range 1 1323.4 1323.37 5.1981 0.028161 *
## ph 1 2050.1 2050.13 8.0528 0.007174 **
## Residuals 39 9928.9 254.59
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect and salinity and pH on percent reproductive apices: daily median salinity
lm6 <- lm(perc.ra ~ daily.med.sal + ph, data =all)
lm6
##
## Call:
## lm(formula = perc.ra ~ daily.med.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.med.sal ph
## 458.7750 0.3165 -55.8557
summary (lm6)
##
## Call:
## lm(formula = perc.ra ~ daily.med.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -23.306 -13.515 -0.889 11.423 36.517
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 458.7750 155.3199 2.954 0.00530 **
## daily.med.sal 0.3165 0.3535 0.895 0.37605
## ph -55.8557 19.5636 -2.855 0.00686 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.56 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1959, Adjusted R-squared: 0.1546
## F-statistic: 4.749 on 2 and 39 DF, p-value: 0.01426
anova (lm6)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.sal 1 369.6 369.55 1.3473 0.252799
## ph 1 2235.8 2235.81 8.1515 0.006859 **
## Residuals 39 10697.0 274.28
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect of salinity and pH on percent reproductive apices: number of days with a daily minimun salinity less than 5
lm7 <- lm(perc.ra ~ min.daily.sal.lt5 + ph, data =all)
lm7
##
## Call:
## lm(formula = perc.ra ~ min.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt5 ph
## 438.127 -0.292 -51.916
summary (lm7)
##
## Call:
## lm(formula = perc.ra ~ min.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -28.341 -13.102 -2.535 12.241 35.112
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 438.1266 160.6456 2.727 0.00952 **
## min.daily.sal.lt5 -0.2920 0.3339 -0.874 0.38722
## ph -51.9161 20.4941 -2.533 0.01543 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.57 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1951, Adjusted R-squared: 0.1538
## F-statistic: 4.727 on 2 and 39 DF, p-value: 0.01452
anova (lm7)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt5 1 833.6 833.61 3.0364 0.08930 .
## ph 1 1761.8 1761.77 6.4172 0.01543 *
## Residuals 39 10707.0 274.54
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect of salinity and pH on percent reproductive apices: number of days with a daily minimun salinity less than 10
lm8 <- lm(perc.ra ~ min.daily.sal.lt10 + ph, data =all)
lm8
##
## Call:
## lm(formula = perc.ra ~ min.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt10 ph
## 442.9136 -0.2187 -52.5542
summary (lm8)
##
## Call:
## lm(formula = perc.ra ~ min.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -26.612 -13.814 -1.956 12.858 35.011
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 442.9136 162.9537 2.718 0.00975 **
## min.daily.sal.lt10 -0.2187 0.3188 -0.686 0.49674
## ph -52.5542 20.8265 -2.523 0.01581 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.63 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1891, Adjusted R-squared: 0.1475
## F-statistic: 4.548 on 2 and 39 DF, p-value: 0.01678
anova (lm8)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt10 1 754.4 754.42 2.7276 0.10665
## ph 1 1761.2 1761.20 6.3677 0.01581 *
## Residuals 39 10786.8 276.58
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm8)
Effect of salinity and pH on percent reproductive apices: number of days with a daily minimun salinity less than 15
lm9 <- lm(perc.ra ~ min.daily.sal.lt15 +ph , data =all)
lm9
##
## Call:
## lm(formula = perc.ra ~ min.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt15 ph
## 458.707 -0.265 -54.426
summary (lm9)
##
## Call:
## lm(formula = perc.ra ~ min.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -24.35 -14.10 -2.00 12.42 34.46
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 458.7067 155.2434 2.955 0.00528 **
## min.daily.sal.lt15 -0.2650 0.2919 -0.908 0.36947
## ph -54.4264 19.7599 -2.754 0.00889 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.56 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1963, Adjusted R-squared: 0.1551
## F-statistic: 4.763 on 2 and 39 DF, p-value: 0.0141
anova (lm9)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt15 1 531.7 531.73 1.9397 0.171588
## ph 1 2079.7 2079.71 7.5867 0.008887 **
## Residuals 39 10690.9 274.13
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm9)
Effect of salinity and pH on percent reproductive apices: number of days with a daily maximum salinity less than 5
lm10 <- lm(perc.ra ~ max.daily.sal.lt5 +ph, data =all)
lm10
##
## Call:
## lm(formula = perc.ra ~ max.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt5 ph
## 477.955387 -0.004578 -57.346528
summary (lm10)
##
## Call:
## lm(formula = perc.ra ~ max.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -26.935 -12.089 -2.399 13.371 35.997
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 477.955387 165.330932 2.891 0.00625 **
## max.daily.sal.lt5 -0.004578 0.325436 -0.014 0.98885
## ph -57.346528 21.110917 -2.716 0.00979 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.73 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1793, Adjusted R-squared: 0.1372
## F-statistic: 4.261 on 2 and 39 DF, p-value: 0.0212
anova (lm10)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt5 1 320.0 319.96 1.143 0.291583
## ph 1 2065.5 2065.54 7.379 0.009787 **
## Residuals 39 10916.9 279.92
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm10)
Effect of salinity and pH on percent reproductive apices: number of days with a daily maximum salinity less than 10
lm11 <- lm(perc.ra ~ max.daily.sal.lt10 +ph, data =all)
lm11
##
## Call:
## lm(formula = perc.ra ~ max.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt10 ph
## 454.3500 -0.1385 -54.1652
summary (lm11)
##
## Call:
## lm(formula = perc.ra ~ max.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -27.692 -12.804 -2.093 12.636 35.612
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 454.3500 165.5109 2.745 0.0091 **
## max.daily.sal.lt10 -0.1385 0.3304 -0.419 0.6774
## ph -54.1652 21.1466 -2.561 0.0144 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.69 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.183, Adjusted R-squared: 0.1411
## F-statistic: 4.368 on 2 and 39 DF, p-value: 0.01942
anova (lm11)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt10 1 606.1 606.11 2.1751 0.14829
## ph 1 1828.3 1828.29 6.5609 0.01441 *
## Residuals 39 10868.0 278.67
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm11)
Effect of salinity and pH on percent reproductive apices: number of days with a daily maximum salinity less than 15
lm12 <- lm(perc.ra ~ max.daily.sal.lt15 +ph, data =all)
lm12
##
## Call:
## lm(formula = perc.ra ~ max.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt15 ph
## 429.3167 -0.2456 -50.8008
summary (lm12)
##
## Call:
## lm(formula = perc.ra ~ max.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -27.721 -13.909 -1.778 13.073 34.964
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 429.3167 166.8886 2.572 0.0140 *
## max.daily.sal.lt15 -0.2456 0.3183 -0.772 0.4449
## ph -50.8008 21.3500 -2.379 0.0223 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.6 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1917, Adjusted R-squared: 0.1502
## F-statistic: 4.624 on 2 and 39 DF, p-value: 0.01577
anova (lm12)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt15 1 988.7 988.72 3.5861 0.06570 .
## ph 1 1561.0 1560.98 5.6617 0.02233 *
## Residuals 39 10752.7 275.71
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm12)
Effect of salinity and pH on percent reproductive apices: number of days with a daily salinity range greater than 10
lm13 <- lm(perc.ra ~ daily.sal.range.gt10 +ph, data =all)
lm13
##
## Call:
## lm(formula = perc.ra ~ daily.sal.range.gt10 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt10 ph
## 478.292663 -0.002928 -57.391466
summary (lm13)
##
## Call:
## lm(formula = perc.ra ~ daily.sal.range.gt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -26.92 -12.09 -2.40 13.36 36.00
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 478.292663 163.633935 2.923 0.00575 **
## daily.sal.range.gt10 -0.002928 0.327580 -0.009 0.99291
## ph -57.391466 20.886545 -2.748 0.00904 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.73 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1793, Adjusted R-squared: 0.1372
## F-statistic: 4.261 on 2 and 39 DF, p-value: 0.0212
anova (lm13)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt10 1 272.0 272.00 0.9717 0.330335
## ph 1 2113.5 2113.47 7.5503 0.009038 **
## Residuals 39 10916.9 279.92
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm13)
Effect of salinity and pH on percent reproductive apices: number of days with a daily salinity range greater than 5
lm14 <- lm(perc.ra ~ daily.sal.range.gt5 +ph, data =all)
lm14
##
## Call:
## lm(formula = perc.ra ~ daily.sal.range.gt5 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt5 ph
## 485.8426 -0.3408 -57.6973
summary (lm14)
##
## Call:
## lm(formula = perc.ra ~ daily.sal.range.gt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -25.651 -13.965 -1.868 12.049 33.914
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 485.8426 152.7678 3.180 0.00288 **
## daily.sal.range.gt5 -0.3408 0.2925 -1.165 0.25102
## ph -57.6973 19.3485 -2.982 0.00492 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.45 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2069, Adjusted R-squared: 0.1663
## F-statistic: 5.088 on 2 and 39 DF, p-value: 0.01088
anova (lm14)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt5 1 347.3 347.3 1.2839 0.264096
## ph 1 2405.4 2405.4 8.8923 0.004916 **
## Residuals 39 10549.7 270.5
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm14)
Different pH terms
Data for pH: ph (median pH), daily.min.ph (daily minimum pH), daily.max.ph (daily maximum pH), daily.ph.range (daily pH range), daily.med.ph (daily median pH), min.daily.ph.lt7/8 (number of days with a daily minimum pH less than 7 and 8), max.daily.ph.lt7 (number of days with a daily maximum pH less than 7), and daily.ph.range.gt0.5 (number of days with a daily pH range greater than 0.5)
Effect salinity and pH on percent reproductive apices: daily minimum ph
lm3 <- lm(perc.ra ~ daily.min.ph + salinity, data =all)
lm3
##
## Call:
## lm(formula = perc.ra ~ daily.min.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.min.ph salinity
## 423.5584 -51.7626 0.2511
summary (lm3)
##
## Call:
## lm(formula = perc.ra ~ daily.min.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -25.457 -15.025 -2.368 14.170 38.629
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 423.5584 222.2713 1.906 0.0641 .
## daily.min.ph -51.7626 28.2430 -1.833 0.0745 .
## salinity 0.2511 0.3790 0.662 0.5116
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 17.5 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1018, Adjusted R-squared: 0.05573
## F-statistic: 2.21 on 2 and 39 DF, p-value: 0.1233
anova (lm3)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.ph 1 1219.7 1219.70 3.9812 0.05303 .
## salinity 1 134.4 134.42 0.4388 0.51162
## Residuals 39 11948.3 306.37
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect salinity and pH on percent reproductive apices: daily maximum ph
lm4 <- lm(perc.ra ~ daily.max.ph + salinity, data =all)
lm4
##
## Call:
## lm(formula = perc.ra ~ daily.max.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.max.ph salinity
## 297.9819 -35.0236 0.3006
summary (lm4)
##
## Call:
## lm(formula = perc.ra ~ daily.max.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -25.68 -15.49 -0.63 10.36 33.84
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 297.9819 118.6628 2.511 0.0163 *
## daily.max.ph -35.0236 14.7249 -2.379 0.0224 *
## salinity 0.3006 0.3641 0.826 0.4140
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 17.05 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.148, Adjusted R-squared: 0.1043
## F-statistic: 3.388 on 2 and 39 DF, p-value: 0.04399
anova (lm4)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.ph 1 1771.0 1770.95 6.0942 0.01805 *
## salinity 1 198.1 198.11 0.6817 0.41401
## Residuals 39 11333.3 290.60
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm4)
Effect of salinity and pH on percent reproductive apices: daily ph range
lm5 <- lm(perc.ra ~ daily.ph.range + salinity, data =all)
lm5
##
## Call:
## lm(formula = perc.ra ~ daily.ph.range + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range salinity
## 15.9402 4.6768 0.3388
summary (lm5)
##
## Call:
## lm(formula = perc.ra ~ daily.ph.range + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.918 -12.588 -5.098 11.829 37.719
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 15.9402 9.0888 1.754 0.0873 .
## daily.ph.range 4.6768 2.3969 1.951 0.0582 .
## salinity 0.3388 0.3709 0.914 0.3666
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 17.41 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1112, Adjusted R-squared: 0.06562
## F-statistic: 2.44 on 2 and 39 DF, p-value: 0.1004
anova (lm5)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range 1 1226.2 1226.21 4.0448 0.05126 .
## salinity 1 253.0 253.01 0.8346 0.36656
## Residuals 39 11823.2 303.16
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
## Warning in sqrt(crit * p * (1 - hh)/hh): NaNs produced
## Warning in sqrt(crit * p * (1 - hh)/hh): NaNs produced
Effect salinity and pH on percent reproductive apices: daily median ph
lm6 <- lm(perc.ra ~ daily.med.ph + salinity, data =all)
lm6
##
## Call:
## lm(formula = perc.ra ~ daily.med.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.med.ph salinity
## 398.1294 -48.0260 0.2833
summary (lm6)
##
## Call:
## lm(formula = perc.ra ~ daily.med.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -22.597 -14.516 0.319 12.003 35.804
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 398.1294 154.5400 2.576 0.0139 *
## daily.med.ph -48.0260 19.4178 -2.473 0.0178 *
## salinity 0.2833 0.3628 0.781 0.4396
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.96 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1567, Adjusted R-squared: 0.1135
## F-statistic: 3.624 on 2 and 39 DF, p-value: 0.03602
anova (lm6)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.ph 1 1909.2 1909.16 6.6374 0.01389 *
## salinity 1 175.4 175.41 0.6098 0.43957
## Residuals 39 11217.8 287.64
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect salinity and pH on percent reproductive apices: number of days with a daily minimun ph less than 7
lm7 <- lm(perc.ra ~ min.daily.ph.lt7 + salinity, data =all)
lm7
##
## Call:
## lm(formula = perc.ra ~ min.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt7 salinity
## 17.5787 -0.2764 0.4509
summary (lm7)
##
## Call:
## lm(formula = perc.ra ~ min.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -23.07 -13.80 -5.86 11.26 36.41
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 17.5787 9.5463 1.841 0.0732 .
## min.daily.ph.lt7 -0.2764 0.3630 -0.761 0.4510
## salinity 0.4509 0.3951 1.141 0.2607
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 18.11 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.03872, Adjusted R-squared: -0.01058
## F-statistic: 0.7855 on 2 and 39 DF, p-value: 0.463
anova (lm7)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt7 1 87.9 87.94 0.2682 0.6075
## salinity 1 427.1 427.15 1.3028 0.2607
## Residuals 39 12787.3 327.88
plot (lm7)
Effect salinity and pH on percent reproductive apices: number of days with a daily minimun ph less than 8
lm7 <- lm(perc.ra ~ min.daily.ph.lt8 + salinity, data =all)
lm7
##
## Call:
## lm(formula = perc.ra ~ min.daily.ph.lt8 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt8 salinity
## 24.0615 -0.3143 0.3995
summary (lm7)
##
## Call:
## lm(formula = perc.ra ~ min.daily.ph.lt8 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -24.274 -13.202 -4.673 11.167 39.771
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 24.0615 10.0746 2.388 0.0219 *
## min.daily.ph.lt8 -0.3143 0.1760 -1.786 0.0819 .
## salinity 0.3995 0.3730 1.071 0.2907
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 17.54 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.09818, Adjusted R-squared: 0.05193
## F-statistic: 2.123 on 2 and 39 DF, p-value: 0.1333
anova (lm7)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt8 1 953.1 953.11 3.0986 0.0862 .
## salinity 1 352.9 352.92 1.1473 0.2907
## Residuals 39 11996.3 307.60
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect salinity and pH on percent reproductive apices: number of days with a daily maximum ph less than 7
lm10 <- lm(perc.ra ~ max.daily.ph.lt7 + salinity, data =all)
lm10
##
## Call:
## lm(formula = perc.ra ~ max.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) max.daily.ph.lt7 salinity
## 17.5787 -0.2764 0.4509
summary (lm10)
##
## Call:
## lm(formula = perc.ra ~ max.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -23.07 -13.80 -5.86 11.26 36.41
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 17.5787 9.5463 1.841 0.0732 .
## max.daily.ph.lt7 -0.2764 0.3630 -0.761 0.4510
## salinity 0.4509 0.3951 1.141 0.2607
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 18.11 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.03872, Adjusted R-squared: -0.01058
## F-statistic: 0.7855 on 2 and 39 DF, p-value: 0.463
anova (lm10)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.ph.lt7 1 87.9 87.94 0.2682 0.6075
## salinity 1 427.1 427.15 1.3028 0.2607
## Residuals 39 12787.3 327.88
plot (lm10)
Effect salinity and pH on percent reproductive apices: number of days with a daily ph range greater than 0.5
lm13 <- lm(perc.ra ~ daily.ph.range.gt0.5 +salinity, data =all)
lm13
##
## Call:
## lm(formula = perc.ra ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range.gt0.5 salinity
## 18.2048 -0.3837 0.4838
summary (lm13)
##
## Call:
## lm(formula = perc.ra ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -24.350 -14.251 -3.089 11.281 36.323
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 18.2048 9.4825 1.920 0.0622 .
## daily.ph.range.gt0.5 -0.3837 0.3406 -1.127 0.2668
## salinity 0.4838 0.3919 1.234 0.2244
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 17.95 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.05518, Adjusted R-squared: 0.006732
## F-statistic: 1.139 on 2 and 39 DF, p-value: 0.3306
anova (lm13)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range.gt0.5 1 243 243.04 0.7542 0.3905
## salinity 1 491 491.03 1.5237 0.2244
## Residuals 39 12568 322.26
plot (lm13)
####Q2.5 Effects of salinity and pH on number of oogonia#### Different salinity terms first
Effect of pH and salinity on number of oogonia
lm1 <- lm(avg.oog ~ salinity + ph + salinity:ph, data =all)
lm1
##
## Call:
## lm(formula = avg.oog ~ salinity + ph + salinity:ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph salinity:ph
## -327.512 27.353 42.719 -3.406
summary (lm1)
##
## Call:
## lm(formula = avg.oog ~ salinity + ph + salinity:ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -25.373 -13.535 -0.961 12.186 35.933
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -327.512 685.432 -0.478 0.636
## salinity 27.353 30.674 0.892 0.378
## ph 42.719 86.729 0.493 0.625
## salinity:ph -3.406 3.884 -0.877 0.386
##
## Residual standard error: 16.28 on 38 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1288, Adjusted R-squared: 0.06005
## F-statistic: 1.873 on 3 and 38 DF, p-value: 0.1506
anova (lm1)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 577.8 577.84 2.1798 0.1481
## ph 1 708.0 708.03 2.6709 0.1105
## salinity:ph 1 203.8 203.78 0.7687 0.3861
## Residuals 38 10073.3 265.09
plot (lm1)
Effect of pH and salinity on number of oogonia, interaction term removed
lm2 <- lm(avg.oog ~ salinity + ph, data =all)
lm2
##
## Call:
## lm(formula = avg.oog ~ salinity + ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph
## 258.3609 0.4595 -31.4307
summary (lm2)
##
## Call:
## lm(formula = avg.oog ~ salinity + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.597 -13.156 -2.196 12.813 37.142
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 258.3609 152.2363 1.697 0.0976 .
## salinity 0.4595 0.3465 1.326 0.1925
## ph -31.4307 19.1748 -1.639 0.1092
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.23 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1112, Adjusted R-squared: 0.06563
## F-statistic: 2.44 on 2 and 39 DF, p-value: 0.1004
anova (lm2)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 577.8 577.84 2.1928 0.1467
## ph 1 708.0 708.03 2.6869 0.1092
## Residuals 39 10277.1 263.51
plot (lm2)
Effect and salinity and pH on number of oogonia: daily minimum salinity
lm3 <- lm(avg.oog ~ daily.min.sal + ph, data =all)
lm3
##
## Call:
## lm(formula = avg.oog ~ daily.min.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.min.sal ph
## 269.8840 0.3959 -32.5891
summary (lm3)
##
## Call:
## lm(formula = avg.oog ~ daily.min.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -22.028 -13.473 -1.431 11.963 38.108
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 269.8840 151.5929 1.780 0.0828 .
## daily.min.sal 0.3959 0.3134 1.263 0.2140
## ph -32.5891 19.1555 -1.701 0.0968 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.27 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1076, Adjusted R-squared: 0.06188
## F-statistic: 2.352 on 2 and 39 DF, p-value: 0.1085
anova (lm3)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.sal 1 478.9 478.93 1.8102 0.18625
## ph 1 765.8 765.77 2.8944 0.09685 .
## Residuals 39 10318.2 264.57
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect and salinity and pH on number of oogonia: daily maximum salinity
lm4 <- lm(avg.oog ~ daily.max.sal + ph, data =all)
lm4
##
## Call:
## lm(formula = avg.oog ~ daily.max.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.max.sal ph
## 247.9452 0.5765 -30.6688
summary (lm4)
##
## Call:
## lm(formula = avg.oog ~ daily.max.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.090 -13.720 -2.557 13.373 37.169
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 247.9452 153.3612 1.617 0.114
## daily.max.sal 0.5765 0.4277 1.348 0.185
## ph -30.6688 19.2173 -1.596 0.119
##
## Residual standard error: 16.22 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1125, Adjusted R-squared: 0.06697
## F-statistic: 2.471 on 2 and 39 DF, p-value: 0.0976
anova (lm4)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.sal 1 630.4 630.45 2.3959 0.1297
## ph 1 670.2 670.18 2.5469 0.1186
## Residuals 39 10262.3 263.14
plot (lm4)
Effect and salinity and pH on number of oogonia: daily salinity range
lm5 <- lm(avg.oog ~ daily.sal.range + ph, data =all)
lm5
##
## Call:
## lm(formula = avg.oog ~ daily.sal.range + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range ph
## 297.548 -0.305 -34.840
summary (lm5)
##
## Call:
## lm(formula = avg.oog ~ daily.sal.range + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -24.464 -13.302 -2.901 8.653 40.074
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 297.5482 154.6217 1.924 0.0616 .
## daily.sal.range -0.3050 0.5663 -0.538 0.5933
## ph -34.8400 19.5570 -1.781 0.0826 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.53 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.07799, Adjusted R-squared: 0.0307
## F-statistic: 1.649 on 2 and 39 DF, p-value: 0.2053
anova (lm5)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range 1 34.2 34.21 0.1251 0.72543
## ph 1 867.5 867.54 3.1736 0.08263 .
## Residuals 39 10661.2 273.36
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect and salinity and pH on number of oogonia: daily median salinity
lm6 <- lm(avg.oog ~ daily.med.sal + ph, data =all)
lm6
##
## Call:
## lm(formula = avg.oog ~ daily.med.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.med.sal ph
## 257.3916 0.4742 -31.3421
summary (lm6)
##
## Call:
## lm(formula = avg.oog ~ daily.med.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.585 -13.355 -1.831 12.819 37.416
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 257.3916 152.0167 1.693 0.0984 .
## daily.med.sal 0.4742 0.3460 1.371 0.1783
## ph -31.3421 19.1476 -1.637 0.1097
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.21 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1138, Adjusted R-squared: 0.06837
## F-statistic: 2.505 on 2 and 39 DF, p-value: 0.09478
anova (lm6)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.sal 1 612.1 612.10 2.3297 0.1350
## ph 1 704.0 703.97 2.6793 0.1097
## Residuals 39 10246.9 262.74
plot (lm6)
Effect of salinity and pH on number of oogonia: number of days with a daily minimun salinity less than 5
lm7 <- lm(avg.oog ~ min.daily.sal.lt5 + ph, data =all)
lm7
##
## Call:
## lm(formula = avg.oog ~ min.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt5 ph
## 342.6633 0.3977 -41.2798
summary (lm7)
##
## Call:
## lm(formula = avg.oog ~ min.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -23.560 -11.497 -4.915 10.810 36.987
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 342.6633 157.9518 2.169 0.0362 *
## min.daily.sal.lt5 0.3977 0.3283 1.211 0.2330
## ph -41.2798 20.1505 -2.049 0.0473 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.29 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1048, Adjusted R-squared: 0.05891
## F-statistic: 2.283 on 2 and 39 DF, p-value: 0.1154
anova (lm7)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt5 1 98.2 98.18 0.3699 0.54658
## ph 1 1113.8 1113.83 4.1967 0.04728 *
## Residuals 39 10350.9 265.41
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect of salinity and pH on number of oogonia: number of days with a daily minimun salinity less than 10
lm8 <- lm(avg.oog ~ min.daily.sal.lt10 + ph, data =all)
lm8
##
## Call:
## lm(formula = avg.oog ~ min.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt10 ph
## 300.77280 0.08209 -35.57520
summary (lm8)
##
## Call:
## lm(formula = avg.oog ~ min.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -25.080 -12.033 -3.883 9.425 39.519
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 300.77280 162.46466 1.851 0.0717 .
## min.daily.sal.lt10 0.08209 0.31789 0.258 0.7976
## ph -35.57520 20.76400 -1.713 0.0946 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.58 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.07272, Adjusted R-squared: 0.02516
## F-statistic: 1.529 on 2 and 39 DF, p-value: 0.2294
anova (lm8)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt10 1 33.8 33.79 0.1229 0.7278
## ph 1 807.0 807.03 2.9354 0.0946 .
## Residuals 39 10722.1 274.93
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm8)
Effect of salinity and pH on number of oogonia: number of days with a daily minimun salinity less than 15
lm9 <- lm(avg.oog ~ min.daily.sal.lt15 +ph , data =all)
lm9
##
## Call:
## lm(formula = avg.oog ~ min.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt15 ph
## 274.615 -0.168 -31.817
summary (lm9)
##
## Call:
## lm(formula = avg.oog ~ min.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -22.652 -13.182 -2.505 9.419 40.466
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 274.6151 154.9433 1.772 0.0841 .
## min.daily.sal.lt15 -0.1680 0.2913 -0.577 0.5675
## ph -31.8173 19.7217 -1.613 0.1147
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.52 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.07898, Adjusted R-squared: 0.03175
## F-statistic: 1.672 on 2 and 39 DF, p-value: 0.201
anova (lm9)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt15 1 202.6 202.55 0.7418 0.3944
## ph 1 710.7 710.74 2.6028 0.1147
## Residuals 39 10649.6 273.07
plot (lm9)
Effect of salinity and pH on number of oogonia: number of days with a daily maximum salinity less than 5
lm10 <- lm(avg.oog ~ max.daily.sal.lt5 +ph, data =all)
lm10
##
## Call:
## lm(formula = avg.oog ~ max.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt5 ph
## 358.7278 0.4094 -43.3428
summary (lm10)
##
## Call:
## lm(formula = avg.oog ~ max.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -23.630 -12.186 -4.173 11.258 36.898
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 358.7278 160.5726 2.234 0.0313 *
## max.daily.sal.lt5 0.4094 0.3161 1.295 0.2029
## ph -43.3428 20.5033 -2.114 0.0410 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.25 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1094, Adjusted R-squared: 0.06377
## F-statistic: 2.396 on 2 and 39 DF, p-value: 0.1043
anova (lm10)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt5 1 85.5 85.49 0.3238 0.57261
## ph 1 1179.9 1179.92 4.4687 0.04097 *
## Residuals 39 10297.5 264.04
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm10)
Effect of salinity and pH on number of oogonia: number of days with a daily maximum salinity less than 10
lm11 <- lm(avg.oog ~ max.daily.sal.lt10 +ph, data =all)
lm11
##
## Call:
## lm(formula = avg.oog ~ max.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt10 ph
## 357.2367 0.3967 -43.1582
summary (lm11)
##
## Call:
## lm(formula = avg.oog ~ max.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -23.269 -12.129 -4.392 11.371 37.157
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 357.2367 161.4298 2.213 0.0328 *
## max.daily.sal.lt10 0.3967 0.3222 1.231 0.2256
## ph -43.1582 20.6251 -2.093 0.0430 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.28 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1059, Adjusted R-squared: 0.06003
## F-statistic: 2.309 on 2 and 39 DF, p-value: 0.1128
anova (lm11)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt10 1 63.6 63.58 0.2398 0.62707
## ph 1 1160.7 1160.73 4.3786 0.04295 *
## Residuals 39 10338.6 265.09
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm11)
Effect of salinity and pH on number of oogonia: number of days with a daily maximum salinity less than 15
lm12 <- lm(avg.oog ~ max.daily.sal.lt15 +ph, data =all)
lm12
##
## Call:
## lm(formula = avg.oog ~ max.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt15 ph
## 327.57 0.20 -39.15
summary (lm12)
##
## Call:
## lm(formula = avg.oog ~ max.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -23.627 -11.785 -4.205 10.219 38.766
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 327.5733 165.9460 1.974 0.0555 .
## max.daily.sal.lt15 0.2000 0.3165 0.632 0.5311
## ph -39.1532 21.2294 -1.844 0.0727 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.51 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.08055, Adjusted R-squared: 0.0334
## F-statistic: 1.708 on 2 and 39 DF, p-value: 0.1945
anova (lm12)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt15 1 4.1 4.13 0.0152 0.90267
## ph 1 927.2 927.24 3.4014 0.07275 .
## Residuals 39 10631.6 272.60
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm12)
Effect of salinity and pH on number of oogonia: number of days with a daily salinity range greater than 10
lm13 <- lm(avg.oog ~ daily.sal.range.gt10 +ph, data =all)
lm13
##
## Call:
## lm(formula = avg.oog ~ daily.sal.range.gt10 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt10 ph
## 350.036 0.398 -42.233
summary (lm13)
##
## Call:
## lm(formula = avg.oog ~ daily.sal.range.gt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -23.769 -12.312 -4.169 10.793 37.080
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 350.0358 159.1529 2.199 0.0338 *
## daily.sal.range.gt10 0.3980 0.3186 1.249 0.2190
## ph -42.2328 20.3146 -2.079 0.0442 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.27 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1069, Adjusted R-squared: 0.06107
## F-statistic: 2.333 on 2 and 39 DF, p-value: 0.1104
anova (lm13)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt10 1 91.3 91.29 0.3447 0.56049
## ph 1 1144.5 1144.46 4.3220 0.04425 *
## Residuals 39 10327.2 264.80
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm13)
Effect of salinity and pH on number of oogonia: number of days with a daily salinity range greater than 5
lm14 <- lm(avg.oog ~ daily.sal.range.gt5 +ph, data =all)
lm14
##
## Call:
## lm(formula = avg.oog ~ daily.sal.range.gt5 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt5 ph
## 292.0056 -0.2252 -33.8972
summary (lm14)
##
## Call:
## lm(formula = avg.oog ~ daily.sal.range.gt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.351 -13.515 -4.114 8.747 40.354
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 292.0056 152.9886 1.909 0.0637 .
## daily.sal.range.gt5 -0.2252 0.2929 -0.769 0.4467
## ph -33.8972 19.3765 -1.749 0.0881 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.47 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.08499, Adjusted R-squared: 0.03807
## F-statistic: 1.811 on 2 and 39 DF, p-value: 0.1769
anova (lm14)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt5 1 152.5 152.51 0.5622 0.45788
## ph 1 830.2 830.24 3.0604 0.08809 .
## Residuals 39 10580.2 271.29
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm14)
Different pH terms
Data for pH: ph (median pH), daily.min.ph (daily minimum pH), daily.max.ph (daily maximum pH), daily.ph.range (daily pH range), daily.med.ph (daily median pH), min.daily.ph.lt7/8 (number of days with a daily minimum pH less than 7 and 8), max.daily.ph.lt7 (number of days with a daily maximum pH less than 7), and daily.ph.range.gt0.5 (number of days with a daily pH range greater than 0.5)
Effect salinity and pH on number of oogonia: daily minimum ph
lm3 <- lm(avg.oog ~ daily.min.ph + salinity, data =all)
lm3
##
## Call:
## lm(formula = avg.oog ~ daily.min.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.min.ph salinity
## -16.1368 3.2230 0.5193
summary (lm3)
##
## Call:
## lm(formula = avg.oog ~ daily.min.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.101 -14.153 -2.433 10.085 38.288
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -16.1368 213.0856 -0.076 0.940
## daily.min.ph 3.2230 27.0758 0.119 0.906
## salinity 0.5193 0.3634 1.429 0.161
##
## Residual standard error: 16.78 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.05032, Adjusted R-squared: 0.001617
## F-statistic: 1.033 on 2 and 39 DF, p-value: 0.3654
anova (lm3)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.ph 1 6.8 6.83 0.0243 0.877
## salinity 1 575.0 575.00 2.0421 0.161
## Residuals 39 10981.1 281.57
plot (lm3)
Effect salinity and pH on number of oogonia: daily maximum ph
lm4 <- lm(avg.oog ~ daily.max.ph + salinity, data =all)
lm4
##
## Call:
## lm(formula = avg.oog ~ daily.max.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.max.ph salinity
## 177.6377 -20.9596 0.4616
summary (lm4)
##
## Call:
## lm(formula = avg.oog ~ daily.max.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.75 -12.67 -2.78 12.67 36.34
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 177.6377 113.6516 1.563 0.126
## daily.max.ph -20.9596 14.1030 -1.486 0.145
## salinity 0.4616 0.3487 1.324 0.193
##
## Residual standard error: 16.33 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1009, Adjusted R-squared: 0.05479
## F-statistic: 2.188 on 2 and 39 DF, p-value: 0.1257
anova (lm4)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.ph 1 699.5 699.55 2.6242 0.1133
## salinity 1 467.1 467.07 1.7522 0.1933
## Residuals 39 10396.3 266.57
plot (lm4)
Effect of salinity and pH on number of oogonia: daily ph range
lm5 <- lm(avg.oog ~ daily.ph.range + salinity, data =all)
lm5
##
## Call:
## lm(formula = avg.oog ~ daily.ph.range + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range salinity
## 9.4404 -1.8467 0.5286
summary (lm5)
##
## Call:
## lm(formula = avg.oog ~ daily.ph.range + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.295 -14.322 -1.301 9.936 37.699
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.4404 8.6887 1.087 0.284
## daily.ph.range -1.8467 2.2914 -0.806 0.425
## salinity 0.5286 0.3545 1.491 0.144
##
## Residual standard error: 16.64 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.06554, Adjusted R-squared: 0.01762
## F-statistic: 1.368 on 2 and 39 DF, p-value: 0.2667
anova (lm5)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range 1 141.9 141.90 0.5122 0.4785
## salinity 1 615.9 615.91 2.2230 0.1440
## Residuals 39 10805.1 277.05
plot (lm5)
## Warning in sqrt(crit * p * (1 - hh)/hh): NaNs produced
## Warning in sqrt(crit * p * (1 - hh)/hh): NaNs produced
Effect salinity and pH on number of oogonia: daily median ph
lm6 <- lm(avg.oog ~ daily.med.ph + salinity, data =all)
lm6
##
## Call:
## lm(formula = avg.oog ~ daily.med.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.med.ph salinity
## 170.3808 -20.2846 0.4688
summary (lm6)
##
## Call:
## lm(formula = avg.oog ~ daily.med.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.567 -13.169 -2.488 11.974 37.207
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 170.3808 150.7278 1.130 0.265
## daily.med.ph -20.2846 18.9388 -1.071 0.291
## salinity 0.4688 0.3539 1.325 0.193
##
## Residual standard error: 16.54 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.07712, Adjusted R-squared: 0.02979
## F-statistic: 1.63 on 2 and 39 DF, p-value: 0.2091
anova (lm6)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.ph 1 411.5 411.45 1.5037 0.2274
## salinity 1 480.3 480.28 1.7553 0.1929
## Residuals 39 10671.2 273.62
plot (lm6)
Effect salinity and pH on number of oogonia: number of days with a daily minimun ph less than 7
lm7 <- lm(avg.oog ~ min.daily.ph.lt7 + salinity, data =all)
lm7
##
## Call:
## lm(formula = avg.oog ~ min.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt7 salinity
## 7.3470 0.4912 0.3908
summary (lm7)
##
## Call:
## lm(formula = avg.oog ~ min.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -24.389 -11.682 -3.208 9.440 35.436
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.3470 8.6029 0.854 0.398
## min.daily.ph.lt7 0.4912 0.3272 1.502 0.141
## salinity 0.3908 0.3560 1.098 0.279
##
## Residual standard error: 16.32 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1019, Adjusted R-squared: 0.05584
## F-statistic: 2.212 on 2 and 39 DF, p-value: 0.123
anova (lm7)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt7 1 857.4 857.36 3.2198 0.08051 .
## salinity 1 320.8 320.81 1.2048 0.27909
## Residuals 39 10384.8 266.28
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect salinity and pH on number of oogonia: number of days with a daily minimun ph less than 8
lm7 <- lm(avg.oog ~ min.daily.ph.lt8 + salinity, data =all)
lm7
##
## Call:
## lm(formula = avg.oog ~ min.daily.ph.lt8 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt8 salinity
## 7.12357 0.08695 0.50654
summary (lm7)
##
## Call:
## lm(formula = avg.oog ~ min.daily.ph.lt8 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.945 -14.133 -1.819 10.889 39.084
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.12357 9.60763 0.741 0.463
## min.daily.ph.lt8 0.08695 0.16783 0.518 0.607
## salinity 0.50654 0.35567 1.424 0.162
##
## Residual standard error: 16.73 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.05647, Adjusted R-squared: 0.008081
## F-statistic: 1.167 on 2 and 39 DF, p-value: 0.3219
anova (lm7)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt8 1 85.5 85.52 0.3057 0.5835
## salinity 1 567.4 567.40 2.0283 0.1623
## Residuals 39 10910.0 279.74
plot (lm7)
Effect salinity and pH on number of oogonia: number of days with a daily maximum ph less than 7
lm10 <- lm(avg.oog ~ max.daily.ph.lt7 + salinity, data =all)
lm10
##
## Call:
## lm(formula = avg.oog ~ max.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) max.daily.ph.lt7 salinity
## 7.3470 0.4912 0.3908
summary (lm10)
##
## Call:
## lm(formula = avg.oog ~ max.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -24.389 -11.682 -3.208 9.440 35.436
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.3470 8.6029 0.854 0.398
## max.daily.ph.lt7 0.4912 0.3272 1.502 0.141
## salinity 0.3908 0.3560 1.098 0.279
##
## Residual standard error: 16.32 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1019, Adjusted R-squared: 0.05584
## F-statistic: 2.212 on 2 and 39 DF, p-value: 0.123
anova (lm10)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.ph.lt7 1 857.4 857.36 3.2198 0.08051 .
## salinity 1 320.8 320.81 1.2048 0.27909
## Residuals 39 10384.8 266.28
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm10)
Effect salinity and pH on number of oogonia: number of days with a daily ph range greater than 0.5
lm13 <- lm(avg.oog ~ daily.ph.range.gt0.5 +salinity, data =all)
lm13
##
## Call:
## lm(formula = avg.oog ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range.gt0.5 salinity
## 7.9904 0.2790 0.4379
summary (lm13)
##
## Call:
## lm(formula = avg.oog ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -22.899 -13.201 -1.963 10.168 36.996
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.9904 8.7775 0.910 0.368
## daily.ph.range.gt0.5 0.2790 0.3152 0.885 0.382
## salinity 0.4379 0.3628 1.207 0.235
##
## Residual standard error: 16.62 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.06868, Adjusted R-squared: 0.02092
## F-statistic: 1.438 on 2 and 39 DF, p-value: 0.2497
anova (lm13)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range.gt0.5 1 391.8 391.76 1.4188 0.2408
## salinity 1 402.4 402.38 1.4572 0.2346
## Residuals 39 10768.8 276.12
plot (lm13)
####Q2.6 Effects of salinity and pH on percent reproductive dry weight####
Different salinity terms first
Effect of pH and salinity on percent reproductive dry weight
lm1 <- lm(perc.rdw ~ salinity + ph + salinity:ph, data =all)
lm1
##
## Call:
## lm(formula = perc.rdw ~ salinity + ph + salinity:ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph salinity:ph
## -603.288 43.925 77.721 -5.527
summary (lm1)
##
## Call:
## lm(formula = perc.rdw ~ salinity + ph + salinity:ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -15.786 -8.517 -3.907 5.933 33.799
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -603.288 529.548 -1.139 0.2617
## salinity 43.925 23.698 1.854 0.0716 .
## ph 77.721 67.005 1.160 0.2533
## salinity:ph -5.527 3.001 -1.842 0.0733 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 12.58 on 38 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2594, Adjusted R-squared: 0.201
## F-statistic: 4.437 on 3 and 38 DF, p-value: 0.009063
anova (lm1)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 267.3 267.28 1.6893 0.201524
## ph 1 1302.1 1302.15 8.2299 0.006692 **
## salinity:ph 1 536.8 536.80 3.3927 0.073301 .
## Residuals 38 6012.5 158.22
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm1)
Effect of pH and salinity on percent reproductive dry weight, interaction term removed
lm2 <- lm(perc.rdw ~ salinity + ph, data =all)
lm2
##
## Call:
## lm(formula = perc.rdw ~ salinity + ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph
## 347.5892 0.2777 -42.6244
summary (lm2)
##
## Call:
## lm(formula = perc.rdw ~ salinity + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -17.873 -10.366 -2.228 8.964 29.716
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 347.5892 121.5290 2.860 0.00677 **
## salinity 0.2777 0.2766 1.004 0.32162
## ph -42.6244 15.3071 -2.785 0.00823 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 12.96 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1933, Adjusted R-squared: 0.1519
## F-statistic: 4.673 on 2 and 39 DF, p-value: 0.01516
anova (lm2)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 267.3 267.28 1.5916 0.214585
## ph 1 1302.1 1302.15 7.7541 0.008226 **
## Residuals 39 6549.3 167.93
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm2)
Effect and salinity and pH on percent reproductive dry weight: daily minimum salinity
lm3 <- lm(perc.rdw ~ daily.min.sal + ph, data =all)
lm3
##
## Call:
## lm(formula = perc.rdw ~ daily.min.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.min.sal ph
## 360.89713 0.09523 -43.74190
summary (lm3)
##
## Call:
## lm(formula = perc.rdw ~ daily.min.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.020 -10.199 -2.009 9.451 29.766
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 360.89713 122.10152 2.956 0.00527 **
## daily.min.sal 0.09523 0.25241 0.377 0.70801
## ph -43.74190 15.42896 -2.835 0.00722 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13.1 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1755, Adjusted R-squared: 0.1332
## F-statistic: 4.15 on 2 and 39 DF, p-value: 0.02323
anova (lm3)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.sal 1 45.0 45.04 0.2624 0.611352
## ph 1 1379.6 1379.58 8.0375 0.007224 **
## Residuals 39 6694.1 171.64
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect and salinity and pH on percent reproductive dry weight: daily maximum salinity
lm4 <- lm(perc.rdw ~ daily.max.sal + ph, data =all)
lm4
##
## Call:
## lm(formula = perc.rdw ~ daily.max.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.max.sal ph
## 319.8808 0.6619 -40.4958
summary (lm4)
##
## Call:
## lm(formula = perc.rdw ~ daily.max.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -17.087 -10.362 -2.455 7.586 27.297
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 319.8808 118.1238 2.708 0.01000 **
## daily.max.sal 0.6619 0.3294 2.009 0.05145 .
## ph -40.4958 14.8018 -2.736 0.00932 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 12.49 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2501, Adjusted R-squared: 0.2116
## F-statistic: 6.504 on 2 and 39 DF, p-value: 0.003652
anova (lm4)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.sal 1 862.0 862.03 5.522 0.023934 *
## ph 1 1168.5 1168.47 7.485 0.009316 **
## Residuals 39 6088.2 156.11
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm4)
Effect and salinity and pH on percent reproductive dry weight: daily salinity range
lm5 <- lm(perc.rdw ~ daily.sal.range + ph, data =all)
lm5
##
## Call:
## lm(formula = perc.rdw ~ daily.sal.range + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range ph
## 338.5447 0.7918 -41.1528
summary (lm5)
##
## Call:
## lm(formula = perc.rdw ~ daily.sal.range + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -22.709 -8.572 -1.581 8.762 29.400
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 338.5447 117.7634 2.875 0.00652 **
## daily.sal.range 0.7918 0.4313 1.836 0.07405 .
## ph -41.1528 14.8951 -2.763 0.00870 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 12.59 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2383, Adjusted R-squared: 0.1992
## F-statistic: 6.1 on 2 and 39 DF, p-value: 0.004955
anova (lm5)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range 1 724.1 724.06 4.5662 0.038937 *
## ph 1 1210.4 1210.42 7.6333 0.008697 **
## Residuals 39 6184.2 158.57
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect and salinity and pH on percent reproductive dry weight: daily median salinity
lm6 <- lm(perc.rdw ~ daily.med.sal + ph, data =all)
lm6
##
## Call:
## lm(formula = perc.rdw ~ daily.med.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.med.sal ph
## 345.8247 0.3052 -42.4766
summary (lm6)
##
## Call:
## lm(formula = perc.rdw ~ daily.med.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -17.622 -10.241 -2.349 8.807 29.601
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 345.8247 121.2045 2.853 0.00689 **
## daily.med.sal 0.3052 0.2758 1.107 0.27525
## ph -42.4766 15.2665 -2.782 0.00827 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 12.92 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1977, Adjusted R-squared: 0.1565
## F-statistic: 4.804 on 2 and 39 DF, p-value: 0.01365
anova (lm6)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.sal 1 311.7 311.72 1.8663 0.179723
## ph 1 1293.0 1293.00 7.7414 0.008275 **
## Residuals 39 6514.0 167.02
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect of salinity and pH on percent reproductive dry weight: number of days with a daily minimun salinity less than 5
lm7 <- lm(perc.rdw ~ min.daily.sal.lt5 + ph, data =all)
lm7
##
## Call:
## lm(formula = perc.rdw ~ min.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt5 ph
## 333.0630 -0.2302 -39.6521
summary (lm7)
##
## Call:
## lm(formula = perc.rdw ~ min.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -22.226 -9.664 -1.050 9.636 28.404
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 333.0630 126.0122 2.643 0.0118 *
## min.daily.sal.lt5 -0.2302 0.2619 -0.879 0.3849
## ph -39.6521 16.0758 -2.467 0.0181 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1885, Adjusted R-squared: 0.1469
## F-statistic: 4.531 on 2 and 39 DF, p-value: 0.01701
anova (lm7)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt5 1 502.9 502.95 2.9774 0.09235 .
## ph 1 1027.7 1027.72 6.0840 0.01814 *
## Residuals 39 6588.0 168.92
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect of salinity and pH on percent reproductive dry weight: number of days with a daily minimun salinity less than 10
lm8 <- lm(perc.rdw ~ min.daily.sal.lt10 + ph, data =all)
lm8
##
## Call:
## lm(formula = perc.rdw ~ min.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt10 ph
## 336.0784 -0.1771 -40.0514
summary (lm8)
##
## Call:
## lm(formula = perc.rdw ~ min.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.857 -10.291 -1.575 10.111 28.304
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 336.0784 127.7850 2.630 0.0122 *
## min.daily.sal.lt10 -0.1771 0.2500 -0.708 0.4830
## ph -40.0514 16.3317 -2.452 0.0188 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13.04 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.183, Adjusted R-squared: 0.1411
## F-statistic: 4.367 on 2 and 39 DF, p-value: 0.01944
anova (lm8)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt10 1 462.6 462.61 2.7199 0.10714
## ph 1 1022.9 1022.89 6.0141 0.01877 *
## Residuals 39 6633.2 170.08
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm8)
Effect of salinity and pH on percent reproductive dry weight: number of days with a daily minimun salinity less than 15
lm9 <- lm(perc.rdw ~ min.daily.sal.lt15 +ph , data =all)
lm9
##
## Call:
## lm(formula = perc.rdw ~ min.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt15 ph
## 351.248 -0.183 -41.927
summary (lm9)
##
## Call:
## lm(formula = perc.rdw ~ min.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -19.328 -10.602 -1.852 9.879 28.043
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 351.2484 122.0759 2.877 0.00647 **
## min.daily.sal.lt15 -0.1830 0.2295 -0.797 0.43008
## ph -41.9272 15.5382 -2.698 0.01024 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13.02 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1857, Adjusted R-squared: 0.144
## F-statistic: 4.448 on 2 and 39 DF, p-value: 0.01819
anova (lm9)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt15 1 273.8 273.79 1.6152 0.21129
## ph 1 1234.2 1234.17 7.2810 0.01024 *
## Residuals 39 6610.7 169.51
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm9)
Effect of salinity and pH on percent reproductive dry weight: number of days with a daily maximum salinity less than 5
lm10 <- lm(perc.rdw ~ max.daily.sal.lt5 +ph, data =all)
lm10
##
## Call:
## lm(formula = perc.rdw ~ max.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt5 ph
## 362.67823 -0.01384 -43.69314
summary (lm10)
##
## Call:
## lm(formula = perc.rdw ~ max.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.172 -10.182 -1.526 9.378 29.077
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 362.67823 129.69542 2.796 0.00798 **
## max.daily.sal.lt5 -0.01384 0.25529 -0.054 0.95705
## ph -43.69314 16.56066 -2.638 0.01191 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13.12 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1725, Adjusted R-squared: 0.1301
## F-statistic: 4.066 on 2 and 39 DF, p-value: 0.0249
anova (lm10)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt5 1 201.6 201.62 1.1705 0.28594
## ph 1 1199.1 1199.08 6.9610 0.01191 *
## Residuals 39 6718.0 172.26
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm10)
Effect of salinity and pH on percent reproductive dry weight: number of days with a daily maximum salinity less than 10
lm11 <- lm(perc.rdw ~ max.daily.sal.lt10 +ph, data =all)
lm11
##
## Call:
## lm(formula = perc.rdw ~ max.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt10 ph
## 344.5771 -0.1164 -41.2532
summary (lm11)
##
## Call:
## lm(formula = perc.rdw ~ max.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.755 -10.317 -1.337 9.488 28.778
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 344.5771 129.7978 2.655 0.0114 *
## max.daily.sal.lt10 -0.1164 0.2591 -0.449 0.6557
## ph -41.2532 16.5837 -2.488 0.0172 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13.09 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1767, Adjusted R-squared: 0.1345
## F-statistic: 4.186 on 2 and 39 DF, p-value: 0.02255
anova (lm11)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt10 1 374.3 374.27 2.1838 0.14750
## ph 1 1060.5 1060.52 6.1881 0.01724 *
## Residuals 39 6683.9 171.38
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm11)
Effect of salinity and pH on percent reproductive dry weight: number of days with a daily maximum salinity less than 15
lm12 <- lm(perc.rdw ~ max.daily.sal.lt15 +ph, data =all)
lm12
##
## Call:
## lm(formula = perc.rdw ~ max.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt15 ph
## 322.7235 -0.2105 -38.3160
summary (lm12)
##
## Call:
## lm(formula = perc.rdw ~ max.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.793 -9.986 -1.512 9.936 28.215
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 322.7235 130.7283 2.469 0.0180 *
## max.daily.sal.lt15 -0.2105 0.2493 -0.844 0.4036
## ph -38.3160 16.7240 -2.291 0.0274 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13.01 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1873, Adjusted R-squared: 0.1456
## F-statistic: 4.495 on 2 and 39 DF, p-value: 0.01751
anova (lm12)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt15 1 632.8 632.83 3.7407 0.06038 .
## ph 1 888.0 888.01 5.2490 0.02745 *
## Residuals 39 6597.9 169.18
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm12)
Effect of salinity and pH on percent reproductive dry weight: number of days with a daily salinity range greater than 10
lm13 <- lm(perc.rdw ~ daily.sal.range.gt10 +ph, data =all)
lm13
##
## Call:
## lm(formula = perc.rdw ~ daily.sal.range.gt10 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt10 ph
## 363.681361 -0.008953 -43.826763
summary (lm13)
##
## Call:
## lm(formula = perc.rdw ~ daily.sal.range.gt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.115 -10.136 -1.567 9.364 29.088
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 363.681361 128.366842 2.833 0.00726 **
## daily.sal.range.gt10 -0.008953 0.256979 -0.035 0.97238
## ph -43.826763 16.384986 -2.675 0.01087 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13.12 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1725, Adjusted R-squared: 0.1301
## F-statistic: 4.065 on 2 and 39 DF, p-value: 0.02492
anova (lm13)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt10 1 167.9 167.92 0.9748 0.32958
## ph 1 1232.5 1232.48 7.1546 0.01087 *
## Residuals 39 6718.3 172.26
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm13)
Effect of salinity and pH on percent reproductive dry weight: number of days with a daily salinity range greater than 5
lm14 <- lm(perc.rdw ~ daily.sal.range.gt5 +ph, data =all)
lm14
##
## Call:
## lm(formula = perc.rdw ~ daily.sal.range.gt5 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt5 ph
## 370.9651 -0.2824 -44.2195
summary (lm14)
##
## Call:
## lm(formula = perc.rdw ~ daily.sal.range.gt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.055 -9.918 -2.218 9.416 27.376
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 370.9651 119.6034 3.102 0.00357 **
## daily.sal.range.gt5 -0.2824 0.2290 -1.233 0.22493
## ph -44.2195 15.1481 -2.919 0.00580 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 12.88 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2035, Adjusted R-squared: 0.1627
## F-statistic: 4.983 on 2 and 39 DF, p-value: 0.01183
anova (lm14)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt5 1 239.4 239.42 1.4440 0.236746
## ph 1 1412.9 1412.88 8.5213 0.005803 **
## Residuals 39 6466.4 165.81
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm14)
Different pH terms
Data for pH: ph (median pH), daily.min.ph (daily minimum pH), daily.max.ph (daily maximum pH), daily.ph.range (daily pH range), daily.med.ph (daily median pH), min.daily.ph.lt7/8 (number of days with a daily minimum pH less than 7 and 8), max.daily.ph.lt7 (number of days with a daily maximum pH less than 7), and daily.ph.range.gt0.5 (number of days with a daily pH range greater than 0.5)
Effect salinity and pH on percent reproductive dry weight: daily minimum ph
lm3 <- lm(perc.rdw ~ daily.min.ph + salinity, data =all)
lm3
##
## Call:
## lm(formula = perc.rdw ~ daily.min.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.min.ph salinity
## 331.8962 -40.9744 0.2429
summary (lm3)
##
## Call:
## lm(formula = perc.rdw ~ daily.min.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -18.871 -11.057 -2.963 8.402 31.335
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 331.8962 172.6218 1.923 0.0618 .
## daily.min.ph -40.9744 21.9342 -1.868 0.0693 .
## salinity 0.2429 0.2944 0.825 0.4143
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13.59 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1123, Adjusted R-squared: 0.06683
## F-statistic: 2.468 on 2 and 39 DF, p-value: 0.09789
anova (lm3)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.ph 1 786.3 786.29 4.2552 0.04583 *
## salinity 1 125.8 125.83 0.6809 0.41428
## Residuals 39 7206.6 184.78
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect salinity and pH on percent reproductive dry weight: daily maximum ph
lm4 <- lm(perc.rdw ~ daily.max.ph + salinity, data =all)
lm4
##
## Call:
## lm(formula = perc.rdw ~ daily.max.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.max.ph salinity
## 252.1492 -30.1703 0.2763
summary (lm4)
##
## Call:
## lm(formula = perc.rdw ~ daily.max.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -19.387 -11.758 -0.526 8.172 27.454
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 252.1492 90.7695 2.778 0.00837 **
## daily.max.ph -30.1703 11.2636 -2.679 0.01077 *
## salinity 0.2763 0.2785 0.992 0.32716
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13.04 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1832, Adjusted R-squared: 0.1413
## F-statistic: 4.373 on 2 and 39 DF, p-value: 0.01934
anova (lm4)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.ph 1 1319.8 1319.82 7.7620 0.008196 **
## salinity 1 167.4 167.43 0.9847 0.327165
## Residuals 39 6631.4 170.04
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm4)
Effect of salinity and pH on percent reproductive dry weight: daily ph range
lm5 <- lm(perc.rdw ~ daily.ph.range + salinity, data =all)
lm5
##
## Call:
## lm(formula = perc.rdw ~ daily.ph.range + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range salinity
## 9.3081 3.1006 0.3181
summary (lm5)
##
## Call:
## lm(formula = perc.rdw ~ daily.ph.range + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -16.738 -9.830 -4.899 6.934 33.163
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.3081 7.1632 1.299 0.201
## daily.ph.range 3.1006 1.8891 1.641 0.109
## salinity 0.3181 0.2923 1.088 0.283
##
## Residual standard error: 13.72 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.09541, Adjusted R-squared: 0.04902
## F-statistic: 2.057 on 2 and 39 DF, p-value: 0.1415
anova (lm5)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range 1 551.6 551.59 2.9292 0.09493 .
## salinity 1 223.0 223.01 1.1843 0.28317
## Residuals 39 7344.1 188.31
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
## Warning in sqrt(crit * p * (1 - hh)/hh): NaNs produced
## Warning in sqrt(crit * p * (1 - hh)/hh): NaNs produced
Effect salinity and pH on percent reproductive dry weight: daily median ph
lm6 <- lm(perc.rdw ~ daily.med.ph + salinity, data =all)
lm6
##
## Call:
## lm(formula = perc.rdw ~ daily.med.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.med.ph salinity
## 326.6628 -39.8913 0.2645
summary (lm6)
##
## Call:
## lm(formula = perc.rdw ~ daily.med.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -17.8236 -10.9259 0.1617 8.6573 29.1252
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 326.6628 118.8742 2.748 0.00903 **
## daily.med.ph -39.8913 14.9364 -2.671 0.01098 *
## salinity 0.2645 0.2791 0.948 0.34901
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13.05 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1824, Adjusted R-squared: 0.1405
## F-statistic: 4.352 on 2 and 39 DF, p-value: 0.01968
anova (lm6)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.ph 1 1328.3 1328.32 7.8049 0.008036 **
## salinity 1 152.9 152.92 0.8985 0.349014
## Residuals 39 6637.5 170.19
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect salinity and pH on percent reproductive dry weight: number of days with a daily minimun ph less than 7
lm7 <- lm(perc.rdw ~ min.daily.ph.lt7 + salinity, data =all)
lm7
##
## Call:
## lm(formula = perc.rdw ~ min.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt7 salinity
## 10.5825 -0.2329 0.4046
summary (lm7)
##
## Call:
## lm(formula = perc.rdw ~ min.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -17.367 -10.370 -5.419 7.118 31.574
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 10.5825 7.4157 1.427 0.162
## min.daily.ph.lt7 -0.2329 0.2820 -0.826 0.414
## salinity 0.4046 0.3069 1.318 0.195
##
## Residual standard error: 14.07 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.04954, Adjusted R-squared: 0.0008036
## F-statistic: 1.016 on 2 and 39 DF, p-value: 0.3713
anova (lm7)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt7 1 58.4 58.40 0.2952 0.5900
## salinity 1 343.8 343.84 1.7378 0.1951
## Residuals 39 7716.5 197.86
plot (lm7)
Effect salinity and pH on percent reproductive dry weight: number of days with a daily minimun ph less than 8
lm7 <- lm(perc.rdw ~ min.daily.ph.lt8 + salinity, data =all)
lm7
##
## Call:
## lm(formula = perc.rdw ~ min.daily.ph.lt8 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt8 salinity
## 16.3081 -0.2758 0.3618
summary (lm7)
##
## Call:
## lm(formula = perc.rdw ~ min.daily.ph.lt8 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -18.579 -9.660 -3.948 9.117 35.019
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 16.3081 7.7483 2.105 0.0418 *
## min.daily.ph.lt8 -0.2758 0.1353 -2.038 0.0484 *
## salinity 0.3618 0.2868 1.261 0.2147
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13.49 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.126, Adjusted R-squared: 0.08116
## F-statistic: 2.811 on 2 and 39 DF, p-value: 0.07239
anova (lm7)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt8 1 733.3 733.32 4.0304 0.05165 .
## salinity 1 289.5 289.46 1.5909 0.21469
## Residuals 39 7095.9 181.95
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect salinity and pH on percent reproductive dry weight: number of days with a daily maximum ph less than 7
lm10 <- lm(perc.rdw ~ max.daily.ph.lt7 + salinity, data =all)
lm10
##
## Call:
## lm(formula = perc.rdw ~ max.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) max.daily.ph.lt7 salinity
## 10.5825 -0.2329 0.4046
summary (lm10)
##
## Call:
## lm(formula = perc.rdw ~ max.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -17.367 -10.370 -5.419 7.118 31.574
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 10.5825 7.4157 1.427 0.162
## max.daily.ph.lt7 -0.2329 0.2820 -0.826 0.414
## salinity 0.4046 0.3069 1.318 0.195
##
## Residual standard error: 14.07 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.04954, Adjusted R-squared: 0.0008036
## F-statistic: 1.016 on 2 and 39 DF, p-value: 0.3713
anova (lm10)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.ph.lt7 1 58.4 58.40 0.2952 0.5900
## salinity 1 343.8 343.84 1.7378 0.1951
## Residuals 39 7716.5 197.86
plot (lm10)
Effect salinity and pH on percent reproductive dry weight: number of days with a daily ph range greater than 0.5
lm13 <- lm(perc.rdw ~ daily.ph.range.gt0.5 +salinity, data =all)
lm13
##
## Call:
## lm(formula = perc.rdw ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range.gt0.5 salinity
## 11.1434 -0.3310 0.4343
summary (lm13)
##
## Call:
## lm(formula = perc.rdw ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -18.522 -10.504 -4.629 7.033 30.710
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 11.1434 7.3481 1.517 0.137
## daily.ph.range.gt0.5 -0.3310 0.2639 -1.254 0.217
## salinity 0.4343 0.3037 1.430 0.161
##
## Residual standard error: 13.91 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.07042, Adjusted R-squared: 0.02274
## F-statistic: 1.477 on 2 and 39 DF, p-value: 0.2408
anova (lm13)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range.gt0.5 1 176.0 176.02 0.9096 0.3461
## salinity 1 395.7 395.66 2.0446 0.1607
## Residuals 39 7547.0 193.51
plot (lm13)
####Looking at water temperature#### Effect of water temperature and salinity on density
lm6 <- lm(no.fuc.q ~ salinity + water.temp + salinity:water.temp, data =all)
lm6
##
## Call:
## lm(formula = no.fuc.q ~ salinity + water.temp + salinity:water.temp,
## data = all)
##
## Coefficients:
## (Intercept) salinity water.temp
## 177.7137 -9.8981 -11.6758
## salinity:water.temp
## 0.7257
summary (lm6)
##
## Call:
## lm(formula = no.fuc.q ~ salinity + water.temp + salinity:water.temp,
## data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -43.221 -19.358 -4.583 14.621 92.281
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 177.7137 76.9094 2.311 0.02456 *
## salinity -9.8981 3.1816 -3.111 0.00293 **
## water.temp -11.6758 5.3644 -2.177 0.03375 *
## salinity:water.temp 0.7257 0.2155 3.368 0.00138 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 27.75 on 56 degrees of freedom
## (1 observation deleted due to missingness)
## Multiple R-squared: 0.3961, Adjusted R-squared: 0.3637
## F-statistic: 12.24 on 3 and 56 DF, p-value: 2.878e-06
anova (lm6)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 5692 5691.8 7.3903 0.008713 **
## water.temp 1 13860 13859.8 17.9959 8.385e-05 ***
## salinity:water.temp 1 8735 8735.0 11.3418 0.001376 **
## Residuals 56 43129 770.2
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect of water temperature, phand salinity on density
lm7 <- lm(no.fuc.q ~ salinity + water.temp +ph + salinity:water.temp:ph + salinity:ph + salinity:water.temp+ water.temp:ph, data =all)
lm7
##
## Call:
## lm(formula = no.fuc.q ~ salinity + water.temp + ph + salinity:water.temp:ph +
## salinity:ph + salinity:water.temp + water.temp:ph, data = all)
##
## Coefficients:
## (Intercept) salinity water.temp
## 9750.40 -611.25 -609.19
## ph salinity:ph salinity:water.temp
## -1212.27 76.19 36.92
## water.temp:ph salinity:water.temp:ph
## 75.56 -4.58
summary (lm7)
##
## Call:
## lm(formula = no.fuc.q ~ salinity + water.temp + ph + salinity:water.temp:ph +
## salinity:ph + salinity:water.temp + water.temp:ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -52.866 -21.189 -3.661 13.849 89.138
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9750.399 8856.496 1.101 0.278
## salinity -611.250 498.721 -1.226 0.228
## water.temp -609.193 540.711 -1.127 0.267
## ph -1212.269 1122.342 -1.080 0.287
## salinity:ph 76.190 63.148 1.207 0.235
## salinity:water.temp 36.919 29.164 1.266 0.213
## water.temp:ph 75.563 68.527 1.103 0.277
## salinity:water.temp:ph -4.580 3.692 -1.241 0.223
##
## Residual standard error: 30.95 on 37 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.439, Adjusted R-squared: 0.3329
## F-statistic: 4.137 on 7 and 37 DF, p-value: 0.001894
anova (lm7)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 12797 12797.3 13.3595 0.0007933 ***
## water.temp 1 5675 5675.2 5.9245 0.0198778 *
## ph 1 377 377.4 0.3939 0.5340958
## salinity:ph 1 2 1.7 0.0018 0.9662474
## salinity:water.temp 1 7366 7366.4 7.6900 0.0086463 **
## water.temp:ph 1 45 44.7 0.0466 0.8302489
## salinity:water.temp:ph 1 1475 1474.5 1.5393 0.2225322
## Residuals 37 35443 957.9
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
####Trying splines#### Try a natural spline –> need to look into what this means
library (splines)
splinefit1 <- lm (avg.oog ~ ns(salinity, knot = median (salinity)) + ns(ph, knot = median(ph)), data = all)
summary (splinefit1)
##
## Call:
## lm(formula = avg.oog ~ ns(salinity, knot = median(salinity)) +
## ns(ph, knot = median(ph)), data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.597 -13.156 -2.196 12.813 37.142
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 24.30 10.26 2.368 0.0229 *
## ns(salinity, knot = median(salinity)) 15.55 11.73 1.326 0.1925
## ns(ph, knot = median(ph)) -30.58 18.65 -1.639 0.1092
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.23 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1112, Adjusted R-squared: 0.06563
## F-statistic: 2.44 on 2 and 39 DF, p-value: 0.1004
anova (splinefit1)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## ns(salinity, knot = median(salinity)) 1 577.8 577.84 2.1928 0.1467
## ns(ph, knot = median(ph)) 1 708.0 708.03 2.6869 0.1092
## Residuals 39 10277.1 263.51
plot (splinefit1)
splinefit2 <- lm (avg.oog ~ ns(salinity, df = 2) + ns(ph, df =2), data = all)
summary (splinefit2)
##
## Call:
## lm(formula = avg.oog ~ ns(salinity, df = 2) + ns(ph, df = 2),
## data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.616 -13.575 -2.146 13.773 35.987
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 24.306 16.020 1.517 0.138
## ns(salinity, df = 2)1 8.505 20.612 0.413 0.682
## ns(salinity, df = 2)2 10.675 9.337 1.143 0.260
## ns(ph, df = 2)1 -22.333 22.781 -0.980 0.333
## ns(ph, df = 2)2 -23.535 15.472 -1.521 0.137
##
## Residual standard error: 16.52 on 37 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1264, Adjusted R-squared: 0.03193
## F-statistic: 1.338 on 4 and 37 DF, p-value: 0.2742
anova (splinefit2)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## ns(salinity, df = 2) 2 695.3 347.63 1.2733 0.2919
## ns(ph, df = 2) 2 766.0 383.00 1.4028 0.2587
## Residuals 37 10101.7 273.02
plot (splinefit2)
splinefit3 <- lm (avg.oog ~ ns(salinity, df = 3) + ns(ph, df =3), data = all)
summary (splinefit3)
##
## Call:
## lm(formula = avg.oog ~ ns(salinity, df = 3) + ns(ph, df = 3),
## data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.907 -12.673 -2.719 14.307 33.941
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 20.354 17.965 1.133 0.265
## ns(salinity, df = 3)1 7.214 10.587 0.681 0.500
## ns(salinity, df = 3)2 3.208 27.581 0.116 0.908
## ns(salinity, df = 3)3 9.209 9.463 0.973 0.337
## ns(ph, df = 3)1 -15.979 12.641 -1.264 0.215
## ns(ph, df = 3)2 -4.894 30.225 -0.162 0.872
## ns(ph, df = 3)3 -17.768 17.181 -1.034 0.308
##
## Residual standard error: 16.82 on 35 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1433, Adjusted R-squared: -0.003618
## F-statistic: 0.9754 on 6 and 35 DF, p-value: 0.4563
anova (splinefit3)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## ns(salinity, df = 3) 3 802.3 267.45 0.9449 0.4295
## ns(ph, df = 3) 3 854.1 284.69 1.0058 0.4018
## Residuals 35 9906.5 283.04
plot (splinefit3)
splinefit4 <- lm (avg.oog ~ ns(salinity, df = 2) + ns(ph, df =3), data = all)
summary (splinefit4)
##
## Call:
## lm(formula = avg.oog ~ ns(salinity, df = 2) + ns(ph, df = 3),
## data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.480 -12.386 -2.965 14.099 34.154
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 19.477 17.138 1.136 0.263
## ns(salinity, df = 2)1 6.320 20.875 0.303 0.764
## ns(salinity, df = 2)2 9.721 9.451 1.029 0.311
## ns(ph, df = 3)1 -16.406 12.361 -1.327 0.193
## ns(ph, df = 3)2 -4.890 29.819 -0.164 0.871
## ns(ph, df = 3)3 -18.287 16.783 -1.090 0.283
##
## Residual standard error: 16.6 on 36 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1424, Adjusted R-squared: 0.02324
## F-statistic: 1.195 on 5 and 36 DF, p-value: 0.3311
anova (splinefit4)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## ns(salinity, df = 2) 2 695.3 347.63 1.2620 0.2953
## ns(ph, df = 3) 3 950.8 316.93 1.1505 0.3420
## Residuals 36 9916.9 275.47
plot (splinefit4)